5

I create a new angular project by angular cli using this command:

$ ng new ng5-app

I wait until all the file created and all the dependencies installed, and after all of those tasks, when I try to run the app using:

$ ng serve

this errors shows up:

            ** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ ** Date: 2018-01-26T14:12:03.297Z
            Hash: 2238da56910f9b52c46b
            Time: 2158ms
            chunk {inline} inline.bundle.js (inline) 5.79 kB [entry] [rendered]
            chunk {main} main.bundle.js (main) 2.93 kB [initial] [rendered]
            chunk {polyfills} polyfills.bundle.js (polyfills) 636 bytes [initial] [rendered]
            chunk {styles} styles.bundle.js (styles) 33.6 kB [initial] [rendered]
            chunk {vendor} vendor.bundle.js (vendor) 852 kB [initial] [rendered]

            ERROR in Error: Could not resolve module H:/
                at StaticSymbolResolver.getSymbolByModule (H:\#htdocs\ng5-app\node_modules\@angular\compiler\bundles\compiler.umd.js:29765:30)
                at StaticReflector.resolveExternalReference (H:\#htdocs\ng5-app\node_modules\@angular\compiler\bundles\compiler.umd.js:31610:62)
                at parseLazyRoute (H:\#htdocs\ng5-app\node_modules\@angular\compiler\bundles\compiler.umd.js:29049:55)
                at AotCompiler.listLazyRoutes (H:\#htdocs\ng5-app\node_modules\@angular\compiler\bundles\compiler.umd.js:31142:43)
                at AngularCompilerProgram.listLazyRoutes (H:\#htdocs\ng5-app\node_modules\@angular\compiler-cli\src\transformers\program.js:156:30)
                at Function.NgTools_InternalApi_NG_2.listLazyRoutes (H:\#htdocs\ng5-app\node_modules\@angular\compiler-cli\src\ngtools_api.js:44:36)
                at AngularCompilerPlugin._getLazyRoutesFromNgtools (H:\#htdocs\ng5-app\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:248:66)
                at Promise.resolve.then.then (H:\#htdocs\ng5-app\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:565:50)
                at process._tickCallback (internal/process/next_tick.js:103:7)

            webpack: Failed to compile.

What is the problem of this error?

3
  • did u run npm install Commented Jan 26, 2018 at 14:04
  • Yes, i did. i run npm instal before ng serve. Commented Jan 26, 2018 at 14:11
  • First glance at the errors, tells me there's something wrong with a module you're trying to using lazyload. Make sure to check your router module. Commented Jan 26, 2018 at 14:26

2 Answers 2

7

I found the solution. I was creating the app folder in #htdocs folder. I moved it outside it and everything works fine. That's so Weird!!!

Sign up to request clarification or add additional context in comments.

1 Comment

I found the problem. There is a problem with '#' in path.
3

The problem here is the #. Remove it and everything will work fine.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.