栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

【npm 报错 gyp info it worked if it ends with ok 大概率是包版本问题】

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

【npm 报错 gyp info it worked if it ends with ok 大概率是包版本问题】

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:Softwarenodejsnode.exe’,
npm ERR! gyp verb cli ‘D:代码webnewxfxtnode_modulesnode-gypbinnode-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对node的版本支持

node 对node-sass的支持

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/965767.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号