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

yarn run dev fails to build right after running init #995

Closed
dedward3 opened this issue Mar 16, 2018 · 4 comments
Closed

yarn run dev fails to build right after running init #995

dedward3 opened this issue Mar 16, 2018 · 4 comments

Comments

@dedward3
Copy link

Version

2.9.3

Reproduction link

https://medium.com/codingthesmartway-com-blog/vue-js-2-quickstart-tutorial-2017-246195cfbdd2

Steps to reproduce

OS -> Mac OS

Here's what I did/reproduction steps

  1. Look at Vue.js/Vue articles for a couple of months
  2. Decide to pull the trigger on a new project in Vue, in defiance of the bloated front-end frameworks present at my company
  3. run "yarn global add vue-cli"
  4. run "yarn init webpack " with options as follows
    • vue build -> standalone
    • install vue-router -> yes
    • use ESLint to lint your code -> yes
    • pick an ESLint preset -> Airbnb
    • Set up unit tests -> yes
    • Pick a test runner -> karma
    • Setup e2e tests with nightwatch -> no
    • Should we run 'npm install' for you -> yes, use yarn
  5. Watch the install process for 235.39s (I'm behind a proxy)
    • everything is in the green at this point
  6. Run "yarn run dev"
    • look at failure message
  7. Wipe a small tear out of the corner of your eye

Error Message:

Module build failed: Error:

Vue packages version mismatch:

  • vue@2.5.13
  • vue-template-compiler@2.5.16

This may cause things to work incorrectly. Make sure to use the same version for both.
If you are using vue-loader@>=10.0, simply update vue-template-compiler.
If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.

What is expected?

Vue build to be successful after having changed nothing in a fresh project.

What is actually happening?

Vue build is failing after having changed nothing in a fresh project.


I'm not trying to be a smart ass with my reproduction link. I will be hounded by our security team if I push things to github, and I don't know how else to show you what's going on. So I just linked the article that I was following.

@dedward3
Copy link
Author

The issue was solved. I locked vue-template-compiler to version 2.5.13 and rebuilt my yarn.lock file. After that everything ran smoothly.

@abrhambas01
Copy link

@dedward3 Hi, I'm not familiar working with yarn .I experienced this issue only I'm working with laravel. How did you lock vue-template-compiler and rebuilt it ? can you please guide me ?

@dedward3
Copy link
Author

@abrhambas01 I went into my package.json file and made sure there were no '~' or '^' in front of vue-template-compiler. I also made sure my vue-template-compiler version matched all the other versions, and then ran 'yarn' and then 'yarn install'.

@abrhambas01
Copy link

In my package.json I don't have vue-template-compiler entry there but I have

vue in there

so what I'm thinking maybe when I do npm install, it pulled the latest version of vue-template-compiler that didn't matched my vue's version.

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

2 participants