Cannot run ng serve in Angular 5.2
Versions
Angular CLI: 1.6.4
Node: 8.9.3
OS: win32 x64
Angular: 5.2.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.6.4
@angular-devkit/build-optimizer: 0.0.37
@angular-devkit/core: 0.0.24
@angular-devkit/schematics: 0.0.45
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.4
@schematics/angular: 0.1.12
typescript: 2.5.3
webpack: 3.10.0
Node Versions
v8.9.3
NPM Versions
5.6.0
Repro steps
- Step 1
Install Angular with:
npm install -g @angular/cli - Step 2
Create a new app with:
ng new Dating.SPA - Step 3
Navigate to the app folder:
cd Dating.SPA - Step 4
Run application with:
ng serve
Observed behavior
ERROR in Error: Could not resolve module D:/C
at StaticSymbolResolver.getSymbolByModule (D:\C#\Practices\Udemy Courses\Dating.SPA\node_modules\@angular\compiler\bundles\compiler.umd.js:29757:30)
at StaticReflector.resolveExternalReference (D:\C#\Practices\Udemy Courses\Dating.SPA\node_modules\@angular\compiler\bundles\compiler.umd.js:31594:62)
at parseLazyRoute (D:\C#\Practices\Udemy Courses\Dating.SPA\node_modules\@angular\compiler\bundles\compiler.umd.js:29043:55)
at AotCompiler.listLazyRoutes (D:\C#\Practices\Udemy Courses\Dating.SPA\node_modules\@angular\compiler\bundles\compiler.umd.js:31134:43)
at AngularCompilerProgram.listLazyRoutes (D:\C#\Practices\Udemy Courses\Dating.SPA\node_modules\@angular\compiler-cli\src\transformers\program.js:156:30)
at Function.NgTools_InternalApi_NG_2.listLazyRoutes (D:\C#\Practices\Udemy Courses\Dating.SPA\node_modules\@angular\compiler-cli\src\ngtools_api.js:44:36)
at AngularCompilerPlugin._getLazyRoutesFromNgtools (D:\C#\Practices\Udemy Courses\Dating.SPA\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:248:66)
at Promise.resolve.then.then (D:\C#\Practices\Udemy Courses\Dating.SPA\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:565:50)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
webpack: Failed to compile.
Desired behavior
This is the first time I try the angular app, I was thinking it should be easy to create and run new demo app. But the errors cannot give me any clues to solve my problem, so I'm posting here to ask if I wrong somewhere one creating and running it. I deleted the node_modules folder and run npm install but still not solve it.
I think I found the issue. It looks like the angular app cannot run on the special character path, in my case is # in C#. I don't know it is a bug or not because in Windows, # is a valid character for the path.
Thank you!
I have a folder named "#8 - Projects" and the angular could not run.
I know It's not recommended to use special character on folders name, but I didn't have problems with that. Always typing "#8 - Projects"/_project_name/etc
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.