默认安装报错误,如下:
下面修改源重新安装
1.清空镜像
npm cache clean --force
2.查看当前的镜像
npm config get registry
3.设置镜像:
npm config set registry https://registry.npmmirror.com
4.安装
C:\Users\huangxueliang\PycharmProjects\vuetest>npm i v-charts [email protected] -S npm warn EBADENGINE Unsupported engine { npm warn EBADENGINE package: '[email protected]', npm warn EBADENGINE required: { node: '>=8.11.4', npm: '6.4.1' }, npm warn EBADENGINE current: { node: 'v20.15.0', npm: '10.7.0' } npm warn EBADENGINE } added 8 packages in 4s 122 packages are looking for funding run `npm fund` for details
安装完成后package.json会有如下内容:
标签:npm,EBADENGINE,vue,charts,warn,registry,安装 From: https://www.cnblogs.com/hxlasky/p/18468042