npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package

# CICD报错 #

今天用CICD跑前端项目,报错如下:

npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2024-07-25T00_28_06_719Z-debug.log
The command '/bin/sh -c npm install' returned a non-zero code: 1
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit code 1

截图:

网上搜寻了一番,得知原因:
 

这些错误信息主要涉及到两个方面:

  1. 依赖包的弃用警告

    • popper.js@1.16.1 已经被弃用,建议使用 @popperjs/core 作为替代。
    • sourcemap-codec@1.4.8 也被弃用,建议使用 @jridgewell/sourcemap-codec 替代。
  2. npm 运行时错误

    • npm ERR! cb() never called! 表示 npm 在执行过程中遇到了一个回调函数没有被调用的错误。
    • 这是一个 npm 自身的问题,建议在 npm 社区 报告此错误。

解决:

npm cache clean --force

npm i

 重新安装推荐的包

npm install @popperjs/core @jridgewell/sourcemap-codec

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值