> core-js-pure@3.11.0 postinstall 和 node -e “try{require(‘xxxx‘)

本文指导如何在项目中安装core-js遇到的问题,涉及npm配置、postinstall警告及处理方式,包括设置`unsafe-perm`并重新安装包的步骤,以及解决fsevents optional dependency的警告。

问题描述:

项目安装npm包出现core-js没有安装上
> core-js-pure@3.11.0 postinstall E:\EnjoyGOV\node_modules\core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> core-js@3.11.0 postinstall E:\EnjoyGOV\node_modules\jspdf\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 877 packages from 626 contributors and audited 950 packages in 53.95s

2 packages are looking for funding
  run `npm fund` for details

found 150 vulnerabilities (12 low, 42 moderate, 75 high, 21 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

因为 npm 安装模块的时候 unsafe-perm 配置出错,要添加以下配置

npm config set unsafe-perm true

然后重新删除包再cnpm i或者yarn

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值