本文介绍了得到错误而脚手架角应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的自耕农作为一种脚手架的工具,我收到以下错误。任何人都可以请帮我在这。我使用Windows 8的环境。

  karma-jasmine@0.1.5 node_modules \\卡玛 - 茉莉
NPM WARN可选DEP失败,继续imagemin-optipng@1.0.0
NPM WARN可选DEP失败,继续imagemin-jpegtran@1.0.0
NPM ERR! EEXIST,打开C:\\用户\\ shouvik-USR \\应用程序数据\\漫游\\ NPM-缓存\\ 4230a95c米
-cache-lodash-2-4-1-包tgz.lock
文件存在:C:\\用户\\ shouvik-USR \\应用程序数据\\漫游\\ NPM-缓存\\ 4230a95c-M-缓存LOD
灰2-4-1-包tgz.lock
将其移开,然后再试一次。NPM ERR!系统Windows_NT 6.2.9200
NPM ERR!命令C:\\\\ Program Files文件(x86)的\\\\ \\\\\\\\的NodeJS node.exeC:\\\\程序文件
S(86)\\\\ \\\\的NodeJS \\\\ node_modules故宫\\\\ \\\\斌NPM-cli.js安装
NPM ERR! CWD C:\\ Shouvik数据\\工作\\尝试
NPM ERR!节点-v v0.10.32
NPM ERR! NPM -v 1.4.28
NPM ERR!路径C:\\用户\\ shouvik-USR \\应用程序数据\\漫游\\ NPM-缓存\\ 4230a95c-M缓存-LO
DASH-2-4-1-包tgz.lock
NPM ERR! code EEXIST
NPM ERR!错误号47
NPM ERR!不正常code 0


解决方案

临时解决方法

运行 NPM安装时手动自耕农任务完成 - 这是没有问题的话

永久的解决方案

更好的办法是更新您的NPM工具。打开 CMD 作为管理员,进入的NodeJS文件夹,在Windows上它的typicaly C:\\ Program Files文件\\的NodeJS C:\\ Program Files文件(x86)的\\的NodeJS 。不是运行故宫故宫安装在下@ NPM -v 检查版本(你可以在这里查看当前版本)。

如果这是不可能例如因为权限就可以安装新版本的故宫到另一个目录,然后由新版本替换旧版本。

要注意安装与 -g 的标志:在Windows全球安装的默认locaiton是%APPDATA%/ NPM 而不是安装的​​NodeJS文件夹 - 如果你安装它通过这种方式,你必须NPM文件移动到它

我还建议备份你原来NPM文件,并在出现故障的情况下,恢复了它 - 比抱歉更好的保存

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.

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
解决方案

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.

这篇关于得到错误而脚手架角应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-10 20:55