npm error enoent:no such file or directory...are-we-there-yet ; package.json文件和node_modules模相互转化
vue-cli項目一段時間沒有變動,幾個星期后繼續編輯安裝?npm install vue-skeleton-webpack-plugin 插件時報錯?npm error ?enoent:no such file or directory...are-we-there-yet 錯誤
產生錯誤的原因:This is still an active issue on Modulus. I've found through some hard lessons that you definitely need to make sure you're making conscious decisions for component versions. All the way from node and npm versions, to things in package.json. If you specify latest version, you will end up with errors when you least want them.
分析:當確定項目版本迭代時候,在package.json文件中要確定所依賴的node、npm組件版本,不然會導致這樣的錯誤。
"engines": {"node": ">= 6.0.0", //最新"npm": "6.11.2" //指定版本},解決思路:重裝依賴或指定項目所使用的依賴版本
方法1:重裝npm? ,命令行窗口使用 npm? install -g npm (親測有效)
方法2:獲取報錯時的npm版本并在package.json文件中指定所依賴的node、npm組件版本
?
詳細參考網址:https://stackoverflow.com/questions/31025048/npm-doesnt-work-get-always-this-error-error-cannot-find-module-are-we-the
?
PS
1、node_modules模塊生成package.json文件使用 “npm init” 命令;
2、將package.json文件自動批量下載安裝依賴的node_modules模塊使用? “npm install” 命令;
總結
以上是生活随笔為你收集整理的npm error enoent:no such file or directory...are-we-there-yet ; package.json文件和node_modules模相互转化的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: tensorflow随笔-底层梯度
- 下一篇: mxnet基础到提高(6)--梯度,反馈