nuxt-community / nuxtent-module

Seamlessly use content files in your Nuxt.js sites.
https://nuxtent-module.netlify.com/guide
MIT License
389 stars 50 forks source link

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

Closed ofek-a closed 5 years ago

ofek-a commented 5 years ago

Version

1.4.1

Reproduction link

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

Steps to reproduce

now to fail the build:

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)
cesasol commented 5 years ago

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.

ofek-a commented 5 years ago

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

RobbieTheWagner commented 5 years ago

Any updates on this?

RobbieTheWagner commented 5 years ago

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

renestalder commented 5 years ago

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 commented 5 years ago

@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:

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

RobbieTheWagner commented 5 years ago

@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 commented 5 years ago

@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.

ofek-a commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

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

cesasol commented 5 years ago

@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 commented 5 years ago

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

cesasol commented 5 years ago

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