Error creating angular image

I use yoman as a tool for scaffolding and I get the following error. Can someone please help me with this. I am using Windows 8 environment.

karma-jasmine@0.1.5 node_modules\karma-jasmine npm WARN optional dep failed, continuing imagemin-optipng@1.0.0 npm WARN optional dep failed, continuing imagemin-jpegtran@1.0.0 npm ERR! EEXIST, open 'C:\Users\shouvik-usr\AppData\Roaming\npm-cache\4230a95c-m -cache-lodash-2-4-1-package-tgz.lock' File exists: C:\Users\shouvik-usr\AppData\Roaming\npm-cache\4230a95c-m-cache-lod ash-2-4-1-package-tgz.lock Move it away, and try again. npm ERR! System Windows_NT 6.2.9200 npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" npm ERR! cwd C:\Shouvik Data\work\try npm ERR! node -v v0.10.32 npm ERR! npm -v 1.4.28 npm ERR! path C:\Users\shouvik-usr\AppData\Roaming\npm-cache\4230a95c-m-cache-lo dash-2-4-1-package-tgz.lock npm ERR! code EEXIST npm ERR! errno 47 npm ERR! not ok code 0 
+5
source share
1 answer

Temporary solution

Run npm install manually when the yoman task runs - no problem.

Permanent solution

It is best to upgrade your npm tool. Open cmd as an administrator and navigate to the nodejs folder, on Windows this is typically C:\Program Files\nodejs or C:\Program Files (x86)\nodejs . Then run npm install npm@next and check the version of npm -v (here you can check the current version).

If this is not possible, for example. due to permissions, you can install the new version of npm in a different directory and then replace the old version with the new version.

Remember the installation with the -g flag: the default for a global installation on Windows is% %APPDATA%/npm by default, not the nodejs installation folder - if you install it this way, you need to move the npm files to it.

I also recommend backing up your original npm files, and in case of failure to restore them, it is better to save than sorry.

+6
source

Source: https://habr.com/ru/post/1204478/


All Articles