How to install the latest angular-cli?
I found the latest version in github is 1.0.0-beta.30. But it always show my version is 1.0.0-beta.28.3 when I try:
sudo npm i -g angular-cli
What could be wrong? Thanks
@grizzm0 npm uninstall -g angular-cli missing the @ at angular-cli.
Thanks for the help!
Hey Guys, Simple things here I ran
npm install -g @angular/cli ng new my-app cd my-app ng serve
ERROR in Error: No NgModule metadata found for 'AppModule'.
at NgModuleResolver.resolve (/Users/hassaniftikhar/RubymineProjects/angular-projects/my-app/node_modules/@angular/compiler/bundles/compiler.umd.js:20277:23)
at CompileMetadataResolver.getNgModuleMetadata (/Users/hassaniftikhar/RubymineProjects/angular-projects/my-app/node_modules/@angular/compiler/bundles/compiler.umd.js:15230:60)
at visitLazyRoute (/Users/hassaniftikhar/RubymineProjects/angular-projects/my-app/node_modules/@angular/compiler/bundles/compiler.umd.js:31169:104)
at AotCompiler.listLazyRoutes (/Users/hassaniftikhar/RubymineProjects/angular-projects/my-app/node_modules/@angular/compiler/bundles/compiler.umd.js:31137:20)
at AngularCompilerProgram.listLazyRoutes (/Users/hassaniftikhar/RubymineProjects/angular-projects/my-app/node_modules/@angular/compiler-cli/src/transformers/program.js:156:30)
at Function.NgTools_InternalApi_NG_2.listLazyRoutes (/Users/hassaniftikhar/RubymineProjects/angular-projects/my-app/node_modules/@angular/compiler-cli/src/ngtools_api.js:44:36)
at AngularCompilerPlugin._getLazyRoutesFromNgtools (/Users/hassaniftikhar/RubymineProjects/angular-projects/my-app/node_modules/@angular/cli/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:248:66)
at Promise.resolve.then.then (/Users/hassaniftikhar/RubymineProjects/angular-projects/my-app/node_modules/@angular/cli/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:565:50)
at
ng -v
Angular CLI: 1.6.5 Node: 8.2.1 OS: darwin x64 Angular: 5.2.1 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router
@angular/cli: 1.6.5 @angular-devkit/build-optimizer: 0.0.41 @angular-devkit/core: 0.0.28 @ngtools/json-schema: 1.1.0 typescript: 2.5.3 webpack: 3.10.0
@hassaniftikhar check the comment below https://github.com/angular/angular-cli/issues/8798#issuecomment-355260025
I've solved it after running following instructions!
npm install npm -g
npm install --save-dev @angular/cli@latest
npm install
npm start
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.