Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'cache-loader/package.json' #1384

Closed
Shokas opened this issue May 29, 2018 · 4 comments
Closed

Cannot find module 'cache-loader/package.json' #1384

Shokas opened this issue May 29, 2018 · 4 comments

Comments

@Shokas
Copy link

Shokas commented May 29, 2018

Version

3.0.0-beta.11

Reproduction link

https://github.com/Shokas/vue-error-test-project

Steps to reproduce

npm install
npm run serve

What is expected?

Get project served at localhost:8080

What is actually happening?

npm complaining about missing module, after installing one after another, it gets to this error "vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config."


$ vue create [project]
pick default preset (babel, eslint)
$ cd [project]
$ npm run serve

@zlab
Copy link

zlab commented May 29, 2018

npm i cache-loader -D

@Shokas
Copy link
Author

Shokas commented May 29, 2018

It does not help. As I wrote, errors about missing modules keep coming:
Cannot find module 'eslint-loader/package.json'
Cannot find module 'vue-loader/package.json'
Cannot find module 'babel-loader/package.json'
Cannot find module 'babel-core'
Cannot find module 'eslint-plugin-vue'
and finally
"vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config."

2 Solutions I've found:
downgrade vue-loader to 14.2.2 or update node (8.2.1), npm (6.1.0) and vue-cli (3.0.0-beta.12) to latest versions

@zlab
Copy link

zlab commented May 29, 2018

@yyx990803

cli-plugin-babel package.json锁定了@babel/core版本,当我在项目的package.json里面安装

"@babel/core": "^7.0.0-beta.49",会造成版本冲突,会报错

Cannot find module 'babel-loader/package.json' #1384

https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-plugin-babel/package.json

"dependencies": {
    "@babel/core": "7.0.0-beta.47",
    "@vue/babel-preset-app": "^3.0.0-beta.12",
    "babel-loader": "^8.0.0-0"
  },

@yyx990803
Copy link
Member

@zlab that's also fixed by 9846cd5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants