vue下安装 v-charts
默认安装报错误,如下:
下面修改源重新安装
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 echarts@4.9.0 -S
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: 'v-click-outside-x@3.7.1',
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会有如下内容:
5.在项目中引入
修改main.js