vue在install時(shí)node-sass@4.14.1?postinstall:node?scripts/build.js錯(cuò)誤解決
今天重裝了node和Vue腳手架,在install的時(shí)候報(bào)了下面的錯(cuò)誤
報(bào)錯(cuò)如下:
Build failed with error code: 1
[npminstall:runscript:error] node-sass@^4.14.1 run postinstall node scripts/build.js error: Error: Command failed with exit code 1: node scripts/build.js
at makeError (E:\node\node_global\node_modules\cnpm\node_modules\execa\lib\error.js:60:11)
at handlePromise (E:\node\node_global\node_modules\cnpm\node_modules\execa\index.js:118:26)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:94:5)
at async Object.exports.runScript (E:\node\node_global\node_modules\cnpm\node_modules\npminstall\lib\utils.js:262:12)
at async runLifecycleScripts (E:\node\node_global\node_modules\cnpm\node_modules\npminstall\lib\lifecycle_scripts.js:64:7)
at async _install (E:\node\node_global\node_modules\cnpm\node_modules\npminstall\lib\install_package.js:318:5)
at async install (E:\node\node_global\node_modules\cnpm\node_modules\npminstall\lib\install_package.js:23:12)
at async _installOne (E:\node\node_global\node_modules\cnpm\node_modules\npminstall\lib\local_install.js:214:15)
at async mapper (E:\node\node_global\node_modules\cnpm\node_modules\npminstall\lib\local_install.js:139:5) {
shortMessage: ‘Command failed with exit code 1: node scripts/build.js’,
command: ‘node scripts/build.js’,
escapedCommand: ‘node “scripts/build.js”’,
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: undefined,
stderr: undefined,
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
× Install fail! Error: run postinstall error, please remove node_modules before retry!
Command failed with exit code 1: node scripts/build.js
Error: Command failed with exit code 1: node scripts/build.js
at makeError (E:\node\node_global\node_modules\cnpm\node_modules\execa\lib\error.js:60:11)
at handlePromise (E:\node\node_global\node_modules\cnpm\node_modules\execa\index.js:118:26)
at processTicksAndRejections (node:internal/process/task_queues:94:5)
at async Object.exports.runScript (E:\node\node_global\node_modules\cnpm\node_modules\npminstall\lib\utils.js:262:12)
at async runLifecycleScripts (E:\node\node_global\node_modules\cnpm\node_modules\npminstall\lib\lifecycle_scripts.js:64:7)
at async _install (E:\node\node_global\node_modules\cnpm\node_modules\npminstall\lib\install_package.js:318:5)
at async mapper (E:\node\node_global\node_modules\cnpm\node_modules\npminstall\lib\local_install.js:139:5)
npminstall version: 7.5.1
npminstall argv: E:\node\node.exe E:\node\node_global\node_modules\cnpm\node_modules\npminstall\bin\install.js --fix-bug-versions --china --userconfig=C:\Users\Administrator.cnpmrc --disturl=https://npmmirror.com/mirrors/node --registry=https://registry.npmmirror.com
解決方式1:
npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass npm install
雖然解決了這個(gè)問(wèn)題,但是我打開頁(yè)面不行。于是我可能知道是node版本太高的原因?qū)е孪螺d的sass源下載不下來(lái),版本高很難下載版本低的東西。
解決方式2:
重裝node,我安裝了node12就沒(méi)問(wèn)題了,這是最粗暴的解決方式
總結(jié)
到此這篇關(guān)于vue在install時(shí)node-sass@4.14.1 postinstall:node scripts/build.js錯(cuò)誤解決的文章就介紹到這了,更多相關(guān)vue install時(shí)node-sass@4.14.1內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
解決echarts圖表y軸數(shù)據(jù)間隔過(guò)大的問(wèn)題
這篇文章主要介紹了解決echarts圖表y軸數(shù)據(jù)間隔過(guò)大的問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-03-03
Vue單頁(yè)式應(yīng)用(Hash模式下)實(shí)現(xiàn)微信分享的實(shí)例
本篇文章介紹了Vue單頁(yè)式應(yīng)用(Hash模式下)實(shí)現(xiàn)微信分享的實(shí)例,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-07-07
Vue使用Echarts實(shí)現(xiàn)橫向柱狀圖,并通過(guò)WebSocket即時(shí)通訊更新
這篇文章主要介紹了Vue使用Echarts實(shí)現(xiàn)橫向柱狀圖,并通過(guò)WebSocket即時(shí)通訊更新方式,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-03-03
Vue中textarea自適應(yīng)高度方案的實(shí)現(xiàn)
本文主要介紹了Vue中textarea自適應(yīng)高度方案的實(shí)現(xiàn),文中通過(guò)示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2022-01-01
vue實(shí)現(xiàn)動(dòng)態(tài)路由的詳細(xì)代碼示例
動(dòng)態(tài)路由,動(dòng)態(tài)即不是寫死的,是可變的,下面這篇文章主要給大家介紹了關(guān)于vue實(shí)現(xiàn)動(dòng)態(tài)路由的詳細(xì)代碼示例,文中通過(guò)圖文以及代碼介紹的非常詳細(xì),需要的朋友可以參考下2024-01-01
vue+vue-validator 表單驗(yàn)證功能的實(shí)現(xiàn)代碼
這篇文章主要介紹了vue+vue-validator 表單驗(yàn)證功能的實(shí)現(xiàn)代碼,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下2017-11-11


