javascript - 微信工作流 yo創建的項目 npm install node prebuild報錯
問題描述
Error: Command failed: node-gyp rebuildgyp ERR! clean errorgyp ERR! stack Error: EPERM: operation not permitted, unlink ’E:phpStudyWWWlocalesnode_modules_node-lwip@0.1.3@node-lwipbuildReleaselwip_decoder.node’gyp ERR! stack at Error (native)gyp ERR! System Windows_NT 10.0.14393gyp ERR! command 'C:Program Filesnodejsnode.exe' 'C:UsersAdministratorAppDataRoamingnpmnode_modulescnpmnode_modulesnpminstallnode-gyp-binnode-gyp.js' 'rebuild'gyp ERR! cwd E:phpStudyWWWlocalesnode_modules_node-lwip@0.1.3@node-lwipgyp ERR! node -v v6.10.3gyp ERR! node-gyp -v v3.6.1gyp ERR! not okat ChildProcess.exithandler (child_process.js:204:12)at emitTwo (events.js:106:13)at ChildProcess.emit (events.js:191:7)at maybeClose (internal/child_process.js:886:16)at Socket.<anonymous> (internal/child_process.js:342:11)at emitOne (events.js:96:13)at Socket.emit (events.js:188:7)at Pipe._handle.close [as _onclose] (net.js:497:12)× Install fail! Error: post install error, please remove node_modules before retry!Run 'C:Windowssystem32cmd.exe /d /s /c node prebuild' error, exit code 1Error: post install error, please remove node_modules before retry!Run 'C:Windowssystem32cmd.exe /d /s /c node prebuild' error, exit code 1at ChildProcess.proc.on.code (C:UsersAdministratorAppDataRoamingnpmnode_modulescnpmnode_modulesrunscriptindex.js:65:21)at emitTwo (events.js:106:13)at ChildProcess.emit (events.js:191:7)at maybeClose (internal/child_process.js:886:16)at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
編譯失敗 根據提示模塊全刪 重新用cnpm安裝還是同樣的錯誤~
找了一些資料 也有一些方法都不能解決問題 求幫助~
問題解答
回答1:試試用yarn來install吧,之前做laravel的項目,依賴vue.js。也是類似問題,npm確實太慢,cnpm貌似會缺少很多東西,最后還是yarn搞定的。yarn兼容npm的命令的,速度比cnpm稍慢,但是比npm快多了。參考
相關文章:
1. python bottle跑起來以后,定時執行的任務為什么每次都重復(多)執行一次?2. python - 爬蟲模擬登錄后,爬取csdn后臺文章列表遇到的問題3. html5 - HTML代碼中的文字亂碼是怎么回事?4. 視頻文件不能播放,怎么辦?5. javascript - vue2如何獲取v-model變量名6. javascript - 求幫助 , ATOM不顯示界面!!!!7. mysql - 分庫分表、分區、讀寫分離 這些都是用在什么場景下 ,會帶來哪些效率或者其他方面的好處8. javascript - 為什么在谷歌控制臺 輸出1的時候,輸出的1立馬就不見了9. javascript - angular使從elastichearch中取出的文本高亮顯示,如圖所示10. javascript - ios返回不執行js怎么解決?
