npm安装错误:错误:在尝试构建Cordova项目时生成ENOENT

时间:2015-04-27 19:38:04

标签: cordova visual-studio-2013 npm windows-8.1 visual-studio-cordova

我在编译项目时遇到问题,我是index的初学者。

尝试多种方式,分别安装依赖项(也许不是刀感),但也试图改变环境变量(例如:C:\ apache-ant-1.9.3 ......)。

我也尝试重新安装(" vs-mda和vs-mda-targets")。

我正在使用Apache Cordova的Visual Studio 2013工具。

enter image description here

包含所有错误的图片: enter link here

2 个答案:

答案 0 :(得分:0)

当npm缓存设置为%ProgramFiles%(需要管理员权限)时,我们已经看到此错误。如果是这种情况,请将其设置为%appdata%内的位置。

npm config get cache --> find out the current cache location. 
npm config set cache %APPDATA%\npm-cache --> set the cache location

你也可以在npm前缀中遇到同样的问题。要解决这个问题,这里有一组命令

npm config get prefix 
npm config set prefix %APPDATA%\npm

答案 1 :(得分:0)

不幸的是,我还没有找到visual 2013的解决方案。但是,请考虑解决方案。我改变了我的机器,安装了具有Cordova的visual studio 2015,一切正常。

相关问题