angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng serve not working

Open CaolanMcB96 opened this issue 8 years ago • 4 comments

When trying to server my angular application i get the following error.

ERROR in multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts Module not found: Error: Can't resolve 'webpack-dev-server/client?http://0.0.0.0:0' in 'C:\Users\Caolan\FingerprintProject\angular-src' ERROR in Error: No NgModule metadata found for 'AppModule'. at NgModuleResolver.resolve (C:\Users\Caolan\FingerprintProject\angular-src\node_modules@angular\compiler\bundles\compiler.umd.js:20285:23) at CompileMetadataResolver.getNgModuleMetadata (C:\Users\Caolan\FingerprintProject\angular-src\node_modules@angular\compiler\bundles\compiler.umd.js:15238:60) at visitLazyRoute (C:\Users\Caolan\FingerprintProject\angular-src\node_modules@angular\compiler\bundles\compiler.umd.js:31176:104) at AotCompiler.listLazyRoutes (C:\Users\Caolan\FingerprintProject\angular-src\node_modules@angular\compiler\bundles\compiler.umd.js:31144:20) at AngularCompilerProgram.listLazyRoutes (C:\Users\Caolan\FingerprintProject\angular-src\node_modules@angular\compiler-cli\src\transformers\program.js:156:30) at Function.NgTools_InternalApi_NG_2.listLazyRoutes (C:\Users\Caolan\FingerprintProject\angular-src\node_modules@angular\compiler-cli\src\ngtools_api.js:44:36) at AngularCompilerPlugin._getLazyRoutesFromNgtools (C:\Users\Caolan\FingerprintProject\angular-src\node_modules@angular\cli\node_modules@ngtools\webpack\src\angular_compiler_plugin.js:263:66) at Promise.resolve.then.then (C:\Users\Caolan\FingerprintProject\angular-src\node_modules@angular\cli\node_modules@ngtools\webpack\src\angular_compiler_plugin.js:586:50) at at process._tickCallback (internal/process/next_tick.js:188:7) -->

Versions


### Repro steps
<!--
CD into my angular-src path
-->
The node.js server is running on port 3000 and is connected to MongoDB in port 27017
when i try to server my application the error as shown above appears


Even when i use the "ng new "name"" command it will not create a new angular project folder

CaolanMcB96 avatar Feb 21 '18 16:02 CaolanMcB96

Please try to Update your angular/cli version to latest

npm install -g @angular/cli@latest

Santhamani avatar Feb 21 '18 17:02 Santhamani

@Santhamani I have already done this but still not working, when i try to create a project folders this is the error that appears (see attached photos angular error1 angular error2

)

CaolanMcB96 avatar Feb 21 '18 18:02 CaolanMcB96

I'm sorry, but this issue is not caused by Angular CLI. Please contact the author(s) of the projects that are having errors during install on their issue tracker.

filipesilva avatar Feb 22 '18 20:02 filipesilva

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.