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

Update 1.3.0 #27

Merged
merged 6 commits into from
Feb 5, 2018
Merged

Update 1.3.0 #27

merged 6 commits into from
Feb 5, 2018

Conversation

qm3ster
Copy link
Member

@qm3ster qm3ster commented Feb 5, 2018

Tested, fixes @AndrewBogdanovTSS's problems in nuxt/nuxt#2310

@qm3ster
Copy link
Member Author

qm3ster commented Feb 5, 2018

@Atinux why can't I merge this but can create new repositories in the organisation?

@Atinux
Copy link
Member

Atinux commented Feb 5, 2018

I just added you as collaborator on this repo @qm3ster

@qm3ster
Copy link
Member Author

qm3ster commented Feb 5, 2018

Thank! I will merge once I fix CI.
Didn't realize you have to do that on a per-repo basis.

@qm3ster
Copy link
Member Author

qm3ster commented Feb 5, 2018

Okay, so, turns out doing npm install instead of yarn breaks it.
Seems like npm installs webpack in a way that friendly-errors-webpack-plugin (on which nuxt directly depends) can't get to its internals.
Doing npm install nuxt on top of the normal install magically fixes it.
As in:
cd ./ && npm install && npm run build fails but
cd ./ && npm install && npm install nuxt && npm run build works.

Alternative fix:
adding this to package.json also helps:

    "vue": "^2.5.13",
    "webpack": "^3.10.0"

@Atinux please advise.

@qm3ster qm3ster merged commit 9e307a9 into nuxt-community:master Feb 5, 2018
@qm3ster qm3ster deleted the update-1.3.0 branch February 5, 2018 14:15
@AndrewBogdanovTSS
Copy link

@qm3ster I've tested your latest commit and I'm getting an error once I hit a root page at localhost:3000

{ Error: Cannot find module 'vue-meta' from 'C:\Projects\Study\Vue\Nuxt\new-version'
    at Function.module.exports [as sync] (C:\Projects\Study\Vue\Nuxt\new-version\node_modules\nuxt\node_modules\re
solve\lib\sync.js:40:15)
    at r (C:\Projects\Study\Vue\Nuxt\new-version\node_modules\nuxt\node_modules\vue-server-renderer\build.js:8149:
44)
    at Object.module.exports.__webpack_exports__.a (server-bundle.js:3030:18)
    at __webpack_require__ (webpack:/webpack/bootstrap 0846202c83fab8a38769:25:0)
    at Object.<anonymous> (.nuxt/index.js:1:0)
    at __webpack_require__ (webpack:/webpack/bootstrap 0846202c83fab8a38769:25:0)
    at Object.<anonymous> (.nuxt/server.js:1:0)
    at __webpack_require__ (webpack:/webpack/bootstrap 0846202c83fab8a38769:25:0)
    at server-bundle.js:92:18
    at Object.<anonymous> (server-bundle.js:95:10)
    at evaluateModule (C:\Projects\Study\Vue\Nuxt\new-version\node_modules\nuxt\node_modules\vue-server-renderer\b
uild.js:8155:21)
    at C:\Projects\Study\Vue\Nuxt\new-version\node_modules\nuxt\node_modules\vue-server-renderer\build.js:8213:18
    at Promise (<anonymous>)
    at C:\Projects\Study\Vue\Nuxt\new-version\node_modules\nuxt\node_modules\vue-server-renderer\build.js:8205:14
    at Object.renderToString (C:\Projects\Study\Vue\Nuxt\new-version\node_modules\nuxt\node_modules\vue-server-ren
derer\build.js:8380:9)
    at Renderer.renderRoute (C:\Projects\Study\Vue\Nuxt\new-version\node_modules\nuxt\lib\core\renderer.js:344:41)
    at Renderer.nuxtMiddleware (C:\Projects\Study\Vue\Nuxt\new-version\node_modules\nuxt\lib\core\middleware\nuxt.
js:12:31)
    at call (C:\Projects\Study\Vue\Nuxt\new-version\node_modules\nuxt\node_modules\connect\index.js:239:7)
    at next (C:\Projects\Study\Vue\Nuxt\new-version\node_modules\nuxt\node_modules\connect\index.js:183:5)
    at SendStream.error (C:\Projects\Study\Vue\Nuxt\new-version\node_modules\nuxt\node_modules\serve-static\index.
js:121:7)
    at emitOne (events.js:115:13)
    at SendStream.emit (events.js:210:7)
  code: 'MODULE_NOT_FOUND',
  statusCode: 500,
  name: 'NuxtServerError' }

@AndrewBogdanovTSS
Copy link

It only bootstrapped after I manually installed vue-meta, vue-router and vuex. My dependencies list now looks like this:

"dependencies": {
    "axios": "^0.17.1",
    "gsap": "^1.20.3",
    "nuxt": "^1.3.0",
    "nuxt-class-component": "^1.2.0",
    "tachyons": "^4.9.1",
    "vue": "^2.5.13",
    "vue-class-component": "^6.1.2",
    "vue-meta": "^1.4.2",
    "vue-property-decorator": "^6.0.0",
    "vue-router": "^3.0.1",
    "vuex": "^3.0.1",
    "vuex-class": "^0.3.0",
    "webpack": "^3.10.0"
  }

investigating futher...

@qm3ster
Copy link
Member Author

qm3ster commented Feb 5, 2018

If you actually want to use this right now, you should either use yarn or run npm install nuxt once. Both fix it completely.

@qm3ster
Copy link
Member Author

qm3ster commented Feb 5, 2018

I am hesitant about adding vue-meta, vue-router and vuex to the template because when using yarn it works without them.

@AndrewBogdanovTSS
Copy link

@qm3ster not everyone uses yarn it should also work with npm. @Atinux maybe you could look into an origin of this issue? Why npm doesn't install those dependencies automatically?

@qm3ster
Copy link
Member Author

qm3ster commented Feb 5, 2018

@AndrewBogdanovTSS it works if you do npm install nuxt 🍕
I do want it to work with npm, but I currently can't track down the problem. I am sure it has something to do with yarn installing everything flat and npm installing things 2 layers deep unless they are depended on by multiple packages. Because if I do npm install and move all of these events up by hand, it starts working.

I am not sure why npm install nuxt fixes it, since it's already a top level direct dependency and is already the exact version that package.json resolves to.

@qm3ster qm3ster restored the update-1.3.0 branch February 5, 2018 15:55
This was referenced Feb 5, 2018
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

Successfully merging this pull request may close these issues.

None yet

3 participants