# 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
截图:
网上搜寻了一番,得知原因:
这些错误信息主要涉及到两个方面:
-
依赖包的弃用警告:
popper.js@1.16.1
已经被弃用,建议使用@popperjs/core
作为替代。sourcemap-codec@1.4.8
也被弃用,建议使用@jridgewell/sourcemap-codec
替代。
-
npm 运行时错误:
npm ERR! cb() never called!
表示 npm 在执行过程中遇到了一个回调函数没有被调用的错误。- 这是一个 npm 自身的问题,建议在 npm 社区 报告此错误。
解决:
npm cache clean --force
npm i
重新安装推荐的包
npm install @popperjs/core @jridgewell/sourcemap-codec