日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學(xué)無先后,達(dá)者為師

網(wǎng)站首頁(yè) 編程語(yǔ)言 正文

【npm 報(bào)錯(cuò) gyp info it worked if it ends with ok 大概率是包版本問題】

作者:愛鍵盤的貓 更新時(shí)間: 2022-10-29 編程語(yǔ)言

node/ node-sass/sass-loader版本兼容問題

問題描述:之前的項(xiàng)目在新電腦上運(yùn)行時(shí),因?yàn)閚ode版本過高,運(yùn)行npm報(bào)錯(cuò)

npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli ‘D:\Software\nodejs\node.exe’,
npm ERR! gyp verb cli ‘D:\代碼\web\newxfxt\node_modules\node-gyp\bin\node-gyp.js’,
npm ERR! gyp verb cli ‘rebuild’,
npm ERR! gyp verb cli ‘–verbose’,
npm ERR! gyp verb cli ‘–libsass_ext=’,
npm ERR! gyp verb cli ‘–libsass_cflags=’,
npm ERR! gyp verb cli ‘–libsass_ldflags=’,
npm ERR! gyp verb cli ‘–libsass_library=’
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@16.13.1 | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing “build” directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable “python2” in the PATH
npm ERR! gyp verb which failed Error: not found: python2

在這里插入圖片描述
刪除node_modules文件夾和package-lock.json,修改package.json文件:

"devDependencies": {
	"sass-loader":"^10.2.0",
    "node-sass":"^6.0.1",
}

或者
1、npm uninstall node-sass;
2、npm i -D sass;
3、npm run dev;

改完后 npm install 完成.
參考:http://www.136.la/nginx/show-243852.html

node-sass對(duì)node的版本支持
在這里插入圖片描述
node 對(duì)node-sass的支持
在這里插入圖片描述

原文鏈接:https://blog.csdn.net/qq_40079749/article/details/125234287

欄目分類
最近更新