Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting error while scaffolding angular app

I am using yeoman as a scaffolding tool and I am getting the following error . Could anyone please help me out in this. I am using windows 8 environment.

[email protected] node_modules\karma-jasmine
npm WARN optional dep failed, continuing [email protected]
npm WARN optional dep failed, continuing [email protected]
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
like image 985
Shouvik Avatar asked Oct 11 '14 16:10

Shouvik


1 Answers

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.

like image 102
Knut Holm Avatar answered Nov 11 '22 13:11

Knut Holm