nodejs安装sharp出错的问题

在安装Node.js的sharp库时遇到错误,需要确保Python版本在v2.5.0到3.0.0之间。通过运行'yarn config set python C:\Python27\python.exe'设置Python路径为2.7版本即可解决。
摘要由CSDN通过智能技术生成
PS D:\report\source\lpd-planning-allocation> yarn
yarn install v1.3.2
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.1.2: The platform "win32" is incompatible with this module.
info "fsevents@1.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/2] ⠄ dtrace-provider
[2/2] ⠄ sharp: C:\Users\chenwes\.node-gyp\8.9.4\x64\node.lib : fatal error LNK1127: ������ [D:\report\esquel\lpd-planning-allocation\node_modules\sharp\build\sharp.vcxproj]
[-/2] ⠄ waiting...
[-/2] ⠄ waiting...
error D:\report\source\lpd-planning-allocation\node_modules\sharp: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: D:\report\esquel\lpd-planning-allocation\node_modules\sharp
Output:
D:\report\source\lpd-planning-allocation\node_modules\sharp>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
gyp info it worked 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值