Cannot find module 'vuetify-loader/lib/plugin'

风流意气都作罢 提交于 2019-12-05 07:24:05

问题


When I load vuetify via the vue-cli3, I get an error when i do npm run serve, saying there is a missing loader.

Docs etc and searches have come up blank.

This is a fresh project, no code loaded. Just following the instructions from the vuetify site.

Can anyone help?


回答1:


I've got the same issues while creating new Vuetify app by official guide.

After adding vuetify: vue add vuetify
The missing step was installing new npm dependencies with: npm install

Later I run npm run serve and it started succesfully.
There is an issue in the documentation!




回答2:


Run npm cache clean --force. It should clear your npm cache. For reference: https://github.com/npm/npm/issues/19072#issuecomment-345555468




回答3:


I got the same error when I cloned a repository and I installed the dependencies only on the master branch. When I switched to a different branch (git checkout different_branch) I forgot to install the dependencies there. So make sure you installed the dependencies before you launch the server.




回答4:


Just had the same problem. In my case it was caused by placing the file vue.config.js in the top-level-folder (next to package.json) instead of in the 'src' folder. Obviously there might be many reasons for this error, but maybe it helps someone...



来源:https://stackoverflow.com/questions/53313828/cannot-find-module-vuetify-loader-lib-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!