【npm 报错 gyp info it worked if it ends with ok 大概率是包版本问题】
问题描述:之前的项目在新电脑上运行时,因为node版本过高与node-sass版本冲突,运行npm报错删除node_modules文件夹和package-lock.json,修改package.json文件:或者1、npm uninstall node-sass;2、npm i -D sass;3、npm run dev;...
node/ node-sass/sass-loader版本兼容问题
问题描述:之前的项目在新电脑上运行时,因为node版本过高,运行npm报错
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 verbwhich
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 完成.
node-sass对node的版本支持
node 对node-sass的支持
更多推荐
所有评论(0)