鍍金池/ 問答/Linux  HTML/ vueJs引入elementUI組件,運(yùn)行時(shí)出現(xiàn)ERROR

vueJs引入elementUI組件,運(yùn)行時(shí)出現(xiàn)ERROR

vueJs引入elementUI組件,運(yùn)行時(shí)出現(xiàn)ERROR:

 ERROR  Failed to compile with 1 errors                                


This dependency was not found:

* element-ui/lib/theme-default/index.css in ./src/main.js

To install it, you can run: npm install --save element-ui/lib/theme-default/inde
x.css
終止批處理操作嗎(Y/N)? n

根據(jù)提示安裝npm install --save element-ui/lib/theme-default/index.css 出現(xiàn)錯(cuò)誤:

H:\webpackLX\Vue-Demo> npm install --save element-ui/lib/theme-default/index.css

npm ERR! code ENOLOCAL
npm ERR! Could not install from "element-ui\lib\theme-default\index.css" as it d
oes not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2018-03-06T0
6_11_20_844Z-debug.log

這是什么原因? 如何解決?

回答
編輯回答
你好胸

clipboard.png
樣式文件路徑改了 不在theme-default

2017年1月19日 17:00
編輯回答
凝雅

index.css是element-ui的東西,不需要單獨(dú)裝。你是不是自己配了css-loader?刪掉。

2017年11月28日 21:32