Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Nuxt 2.3.x and above failing to build Nuxtent pages #190

Closed
ofek-a opened this issue Dec 24, 2018 · 16 comments
Closed

Nuxt 2.3.x and above failing to build Nuxtent pages #190

ofek-a opened this issue Dec 24, 2018 · 16 comments

Comments

@ofek-a
Copy link

ofek-a commented Dec 24, 2018

Version

1.4.1

Reproduction link

https://github.com/OfekA/static-site-nuxt-issue

Steps to reproduce

  • clone the repo from the Reproduction link
  • npm install
  • npm run generate
  • the build should be successful including Nuxtent pages (path: /careers)
    you should see something similar in the log:
    2.2.0_and_below.png

now to fail the build:

  • update the 'Nuxt' dependency in package.json to 2.3.4 or anything 2.3.x and above
  • delete package-lock.json file and the node-modules folder
  • npm install
  • npm run generate
  • the build will successful but Nuxtent pages will not be generated (path: /careers)
    you should see something similar in the log:
    2.3.x and above.png

What is expected?

Nuxtent pages to be generated just like in Nuxt 2.2.0 and below

What is actually happening?

Nuxtent pages are not generated

Additional comments?

I've also posted the issue in the Nuxt Discord channel, @manniL checked the issue there and concluded that it is most likely related to Nuxtent and not Nuxt itself.
Would really appreciate some help here as this is the only thing blocking me from upgrading to Nuxt 2.3.x and above. Thanks in advance!

This bug report is available on Nuxt community (#c144)
@ghost ghost added the cmty:bug-report label Dec 24, 2018
@cesasol
Copy link
Collaborator

cesasol commented Dec 24, 2018

Nuxt indeed broke nuxtent and there is a fix but is not backwards compatible, that's why it wasn't updated. You can install @dinamomx/nuxtent that is like a beta version of this package.

@cesasol cesasol closed this as completed Dec 24, 2018
@ofek-a
Copy link
Author

ofek-a commented Dec 30, 2018

@cesasol thanks, that branch indeed seems to work. Is there any rough estimate to when it should be merged with master?

medfreeman added a commit to medfreeman/nuxt-netlify-cms-module that referenced this issue Jan 19, 2019
Replace `nuxtent` by `@dinamomx/nuxtent` dependency, temporary fix, see nuxt-community/nuxtent-module#190
Update lockfile
@RobbieTheWagner
Copy link

Any updates on this?

@RobbieTheWagner
Copy link

@cesasol @ofeka I am unable to get @dinamomx/nuxtent to work either. Is there another workaround for Nuxt 2.4.x?

@renestalder
Copy link

That's also my biggest blocker currently. If there is a fix, couldn't that be cherry picked to master and released as patch?

@ofek-a
Copy link
Author

ofek-a commented Feb 16, 2019

@rwwagner90 @renestalder This issue is really annoying and I'm not sure why the issue was closed as it's very critical.

Anyway, @dinamomx/nuxtent does work for me on the latest nuxt 2.4.x, I'll try to help:

  • Make sure you have "@dinamomx/nuxtent": "3.0.1" in your package.json.
  • Make sure you have "@dinamomx/nuxtent" under modules in nuxt.config.js
  • I have my Nuxtent config under nuxtent object in nuxt.config.js
  • Make sure you delete package-lock.json file and node_modules folder and reinstall the dependency tree.

That's all I can think about at the moment, hopefully it will work for you now..

@RobbieTheWagner
Copy link

@ofeka do you have an example app I could take a look at? When I run nuxt generate I get an error:

ℹ Generating: true                                                                                                                              nuxt:nuxtent 08:17:08
ℹ opening server connection                                                                                                                     nuxt:nuxtent 08:17:08
ℹ prefix: undefined baseurl: undefined                                                                                                          nuxt:nuxtent 08:17:08

 FATAL  Cannot read property 'length' of undefined                                                                                                           08:17:08

  at pathtoRegexp (node_modules/express/node_modules/path-to-regexp/index.js:63:49)
  at new Layer (node_modules/express/lib/router/layer.js:45:17)
  at Function.use (node_modules/express/lib/router/index.js:464:17)
  at Function.<anonymous> (node_modules/express/lib/application.js:220:21)
  at Array.forEach (<anonymous>)
  at Function.use (node_modules/express/lib/application.js:217:7)
  at nuxt.hook (node_modules/@dinamomx/nuxtent/dist/module.js:1113:11)
  at utils.sequence.fn (node_modules/@nuxt/core/dist/core.js:436:53)
  at promise.then (node_modules/@nuxt/utils/dist/utils.js:1664:43)
  at processTicksAndRejections (internal/process/next_tick.js:81:5)

If I run in dev and go to localhost:3000 I see a giant block of text, rather than the site as well. It appears to just spit out all the JSON.

@renestalder
Copy link

@ofeka I just don't like the note in the README of that branch/npm package that tells me to not use it in production.

medfreeman added a commit to medfreeman/nuxt-netlify-cms-module that referenced this issue Feb 21, 2019
Replace `nuxtent` by `@dinamomx/nuxtent` dependency, temporary fix, see nuxt-community/nuxtent-module#190
Update lockfile
medfreeman added a commit to medfreeman/nuxt-netlify-cms-module that referenced this issue Feb 21, 2019
Replace `nuxtent` by `@dinamomx/nuxtent` dependency, temporary fix, see nuxt-community/nuxtent-module#190
Update lockfile
medfreeman added a commit to medfreeman/nuxt-netlify-cms-module that referenced this issue Feb 21, 2019
BREAKING CHANGE: This module is no more compatible with nuxt versions older than v2.0.0
Update `nuxt` devDependency to v.2.0.0

Compatibility with webpack v4
Add `FriendlyErrorsWebpackPlugin`
Add `@nuxt/friendly-errors-webpack-plugin`, `extract-css-chunks-webpack-plugin`
Use `consola` instead of debug for logging, improve messages
Add `webpackbar` in production, improve logging
Upgrade husky, move config to its own key
Remove `.yarnrc` engine compatibility fix

Replace `nuxtent` by `@dinamomx/nuxtent` dependency, temporary fix, see nuxt-community/nuxtent-module#190
Fix `nuxt-netlify-cms` dependency to `file` protocol
@ofek-a
Copy link
Author

ofek-a commented Apr 17, 2019

@renestalder @rwwagner90 We have now completely stopped using nuxtent because all the issues it had, I was able to quickly convert our old markdown content to be using nuxt-gustave within 1 hour and update to the latest nuxt@2.6.2, hopefully, this will help...

@cesasol
Copy link
Collaborator

cesasol commented Apr 26, 2019

@ofeka Sorry for the radio silence, as the now only maintainer there is so much that I can when I have a full time project, but there is a new version @dinamomx/nuxtent that works with nuxt 2.6.* and Gustave looks interesting, sure there is something that I can learn from them

@ofek-a
Copy link
Author

ofek-a commented Apr 27, 2019

@cesasol No hard feelings, and thanks for still supporting Nuxtent, it served us well and IMO this is mostly the fault of Nuxt for breaking support multiple times for such a core plugin in their ecosystem.

@RobbieTheWagner
Copy link

The @dinamomx/nuxtent actually does not work either. I ended up needing to just use the webpack frontmatter-markdown-loader and do things manually.

@RobbieTheWagner
Copy link

@cesasol perhaps we could collaborate with whoever is working on the dinamomx one and get some more maintainers added here?

@cesasol
Copy link
Collaborator

cesasol commented Apr 30, 2019

@rwwagner90 I am the maintainer of the dinamomx repo but that fork is intended as a mirror to work with full admin permission for deployment purposes making this repo the official one. So it would make sense to collaborate to this one repo

@RobbieTheWagner
Copy link

@cesasol I'm not sure I understand, but okay. Are you able to add maintainers here?

@cesasol
Copy link
Collaborator

cesasol commented May 2, 2019

@rwwagner90 Not here, alidcastano only put me as a collaborator on this repo so I don't have to many privileges

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

No branches or pull requests

4 participants