npm error enoent:no such file or directory...are-we-there-yet ; package.json文件和node_modules模相互转化
vue-cli項(xiàng)目一段時(shí)間沒(méi)有變動(dòng),幾個(gè)星期后繼續(xù)編輯安裝?npm install vue-skeleton-webpack-plugin 插件時(shí)報(bào)錯(cuò)?npm error ?enoent:no such file or directory...are-we-there-yet 錯(cuò)誤
產(chǎn)生錯(cuò)誤的原因: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.
分析:當(dāng)確定項(xiàng)目版本迭代時(shí)候,在package.json文件中要確定所依賴(lài)的node、npm組件版本,不然會(huì)導(dǎo)致這樣的錯(cuò)誤。
"engines": {"node": ">= 6.0.0", //最新"npm": "6.11.2" //指定版本},解決思路:重裝依賴(lài)或指定項(xiàng)目所使用的依賴(lài)版本
方法1:重裝npm? ,命令行窗口使用 npm? install -g npm (親測(cè)有效)
方法2:獲取報(bào)錯(cuò)時(shí)的npm版本并在package.json文件中指定所依賴(lài)的node、npm組件版本
?
詳細(xì)參考網(wǎng)址: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文件自動(dòng)批量下載安裝依賴(lài)的node_modules模塊使用? “npm install” 命令;
總結(jié)
以上是生活随笔為你收集整理的npm error enoent:no such file or directory...are-we-there-yet ; package.json文件和node_modules模相互转化的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: tensorflow随笔-底层梯度
- 下一篇: mxnet基础到提高(6)--梯度,反馈