Getting error while scaffolding angular app

与世无争的帅哥 提交于 2019-12-04 08:45:43

Temporary solution

Run npm install manually when yeoman task is done - it's without problems then.

Permanent solution

The better way is to update your npm tool. Open cmd as the admin and go into nodejs folder, on Windows it's typicaly C:\Program Files\nodejs or C:\Program Files (x86)\nodejs. Than run npm install npm@next and check the version by npm -v (you can check current version here).

If it's not possible e.g. because of permissions you can install the new npm version into another directory and then replace the old version by the new version.

Be aware of installation with -g flag: the default locaiton for global installation on Windows is %APPDATA%/npm and not nodejs installation folder - if you install it this way you have to move npm files into it.

I also recommend to backup your original npm files and in the case of failure to restore it - better save than sorry.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!