cordova – ENOENT:没有这样的文件或目录,重命名ansistyles – > .ansistyles.DELETE

我在运行npm install时遇到错误.它抱怨没有找到模块/ node_modules / ansistyles …该文件夹确实不存在,但有一个带破折号:/ node_modules / ansi-styles.

npm install
npm WARN [email protected] No repository field.

npm ERR! path /app/node_modules/npm/node_modules/ansistyles
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory,rename '/app/node_modules/npm/node_modules/ansistyles' -> '/app/node_modules/npm/node_modules/.ansistyles.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /.npm/_logs/2018-02-01T13_20_48_203Z-debug.log

运行cordova插件删除或cordova插件添加时,我也遇到了同样的错误.

解决方法

删除package-lock.json在我的Mac上完成了这个技巧!

相关文章

公司前端界面用的是vue,我要嵌入到Android中生成App第一步:...
Q:我用cordova开发项目,想在app内跳转外部链接,安装了cord...
我正在使用https://github.com/arnesson/cordova-plugin-fir...
一、Cordova的基础点在混合式应用中,我们通过现有的Cordova...
cordova自定义插件注意:存放自定义cordova插件目录不能有空...
一、问题VueAPP中有一个文件下载功能,用了各种方法来实现下...