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

How to install the latest angular-cli?

Open zh-wowtv opened this issue 9 years ago • 25 comments

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

zh-wowtv avatar Feb 03 '17 08:02 zh-wowtv

@grizzm0 npm uninstall -g angular-cli missing the @ at angular-cli. Thanks for the help!

rwmb avatar Jan 15 '18 12:01 rwmb

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 at process._tickCallback (internal/process/next_tick.js:188:7)

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 avatar Jan 19 '18 19:01 hassaniftikhar

@hassaniftikhar check the comment below https://github.com/angular/angular-cli/issues/8798#issuecomment-355260025

rwmb avatar Jan 22 '18 09:01 rwmb

I've solved it after running following instructions! npm install npm -g npm install --save-dev @angular/cli@latest npm install npm start

captainhook99999 avatar Mar 20 '18 08:03 captainhook99999

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.