vue-element-admin安裝依賴報錯--解決


第二天了, 我解決了,刪除這個"tui-editor": "1.3.3"包,然后npm  install運行成功,,再運行npm run dev ,報錯說是需要安裝這個npm install --save tui-editor。

然后再網上看見說可能是因為服務器連接github速度很慢,導致下載這個包超時, 檢查了下是"tui-editor"這個庫的依賴,如果你們項目中沒有用到那個markdown組件,可以把這個從package.json中移除。

 

tui-editor 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/MarkdownEditor/index.vue?vue&type=script&lang=js&
* tui-editor/dist/tui-editor-contents.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/MarkdownEditor/index.vue?vue&type=script&lang=js&
* tui-editor/dist/tui-editor.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/MarkdownEditor/index.vue?vue&type=script&lang=js&

To install them, you can run: npm install --save tui-editor tui-editor/dist/tui-editor-contents.css tui-editor/dist/tui-editor.css

 

如果你們項目中沒有用到那個markdown組件,可以把這個從package.json中移除

vue-element-admin\package.json 刪除 "tui-editor": "1.3.3",
vue-element-admin\src\components 刪除 MarkdownEditor 文件夾
vue-element-admin\src\views\components-demo 刪除 markdown.vue 文件
vue-element-admin\src\router\modules components.js 刪除 {path: 'markdown',...}

//npm cache clean --force 
//npm install cnpm
//npm install core-js@3 --save
//cnpm install cross-env 這四個沒有用到,如果解決不了在運行的

npm install
npm run dev

 運行完了就可以成功打開了

上一篇地址https://www.cnblogs.com/Privatexaio/p/16037365.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM