解决报错:To install them, you can run: npm install --save element-ui/lib/empty element-ui/lib/theme-chal

报错内容:

These dependencies were not found:

* element-ui/lib/empty in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/sbgl/FpkcInfo.vue?vue&type=script&lang=js&
* element-ui/lib/theme-chalk/empty.css in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/sbgl/FpkcInfo.vue?vue&type=script&lang=js&

To install them, you can run: npm install --save element-ui/lib/empty element-ui/lib/theme-chalk/empty.css

These dependencies were not found:

* element-ui/lib/empty in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/sbgl/FpkcInfo.vue?vue&type=script&lang=js&
* element-ui/lib/theme-chalk/empty.css in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/sbgl/FpkcInfo.vue?vue&type=script&lang=js&

To install them, you can run: npm install --save element-ui/lib/empty element-ui/lib/theme-chalk/empty.css

报错图片:

解决办法:

1.删除已下载的node_moudules文件夹

2.清除下载缓存:npm cache clean --force

3.重新下载:npm install

4.npm install element-ui -s

猜你喜欢

转载自blog.csdn.net/m0_46615524/article/details/130065066