久久r热视频,国产午夜精品一区二区三区视频,亚洲精品自拍偷拍,欧美日韩精品二区

您的位置:首頁技術(shù)文章
文章詳情頁

vue在install時node-sass@4.14.1 postinstall:node scripts/build.js錯誤解決

瀏覽:210日期:2022-06-09 17:50:12
目錄
  • 報錯如下:
  • 解決方式1:
  • 解決方式2:
  • 總結(jié)

今天重裝了node和Vue腳手架,在install的時候報了下面的錯誤

報錯如下:

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-sassnpm install

雖然解決了這個問題,但是我打開頁面不行。于是我可能知道是node版本太高的原因?qū)е孪螺d的sass源下載不下來,版本高很難下載版本低的東西。

解決方式2:

重裝node,我安裝了node12就沒問題了,這是最粗暴的解決方式

總結(jié)

到此這篇關(guān)于vue在install時node-sass@4.14.1 postinstall:node scripts/build.js錯誤解決的文章就介紹到這了,更多相關(guān)vue install時node-sass@4.14.1內(nèi)容請搜索以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持!

標(biāo)簽: JavaScript
主站蜘蛛池模板: 即墨市| 汪清县| 沛县| 石楼县| 凤庆县| 修水县| 白朗县| 宜黄县| 定南县| 揭西县| 丹江口市| 合江县| 岑巩县| 新宾| 陇南市| 类乌齐县| 家居| 台中县| 临夏市| 崇左市| 黄石市| 常熟市| 洪湖市| 昭通市| 介休市| 东安县| 武山县| 古田县| 长泰县| 沾益县| 台安县| 象山县| 固镇县| 萍乡市| 乐平市| 临沂市| 高唐县| 定州市| 陇南市| 南平市| 彰化县|