解决报错: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

报错图片:

解决报错:To install them, you can run: npm install --save element-ui/lib/empty element-ui/lib/theme-chal_第1张图片

解决办法:

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

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

3.重新下载:npm install

4.npm install element-ui -s

你可能感兴趣的:(前端bug,npm,前端,bug)