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

Why do I have to install angular-cli@webpack locally if I have already installed globally?

Open colinfang opened this issue 10 years ago • 5 comments

I did npm install -g angular-cli@webpack.

After I ng new a project, I found that it installs a local 1.0.0-beta.11-webpack.8 .

If I delete it, ng serve complains about the project is not a valid angular-cli project.

colinfang avatar Sep 06 '16 14:09 colinfang

you have the option to link to the global path when you create a new project and it will symlink to it with:
ng new <project-name> --link-cli

JSMike avatar Sep 06 '16 16:09 JSMike

would it be possible to have an automatic detection, if angular-cli is globally available?

jahller avatar Sep 07 '16 14:09 jahller

It's ideal to not have a global cli or rely on any global packages. If one can pull a project down and run npm i and have everything needed, that is better IMO.

ghost avatar Sep 08 '16 03:09 ghost

The global install is what allows you to do stuff like ng new project, while the local one is used afterwards. This is especially relevant when using different versions of global and local, across different projects.

filipesilva avatar Sep 19 '16 02:09 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.