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

Nuxt 3 support #974

Closed
Hecatron opened this issue Oct 12, 2021 · 56 comments
Closed

Nuxt 3 support #974

Hecatron opened this issue Oct 12, 2021 · 56 comments
Labels
bug Something isn't working

Comments

@Hecatron
Copy link

Hecatron commented Oct 12, 2021

Nuxt 3 has recently been released - https://v3.nuxtjs.org/
However it looks like content doesn't work with it yet
Edit after further reading the docs it looks as if the plan is to rewrite this for nuxt 3 in the future.

That being said I've instead being trying it in bridge mode now that I understand how that works.
Since bridge mode has a higher chance of working with older modules

But I'm still getting

Server Side Rendering Error: Error: inject('content', value) has no value provided

Version

@nuxt/content: tried this with the latest stable v1.14.0 and the master 10f186d
nuxt: @nuxt/bridge / npm:@nuxt/bridge-edge

@Hecatron Hecatron added the bug Something isn't working label Oct 12, 2021
@AgustinBanchio
Copy link

Nuxt 3 is in Beta, the Nuxt Bridge upgrade page specifically mentions nuxt/content as an incompatible plugin.

I'd recommend staying with Nuxt 2 until the "planned rewrite" for nuxt/content.

I'm not affiliated with Nuxt development or any of the plugins.

@lucpotage
Copy link
Sponsor

Is Docus going to replace nuxt-content?

@lucpotage
Copy link
Sponsor

Answered in this tweet: https://twitter.com/Atinux/status/1448221492681093124

@Hecatron
Copy link
Author

Hecatron commented Oct 13, 2021

It feels like docus is a layer on top of nuxt for writing documentation, so similar to content
although my own personal use case is for using content with nuxt is as part of a blog and not for docs
will docus be an option for blogs?

@stewones
Copy link

excited for this. any eta?

@Hecatron
Copy link
Author

There are packages on npm but I don't think they've released anything publicly yet
in terms of any docs or any details on how to use it

@husayt
Copy link

husayt commented Nov 10, 2021

Hi, still no clear migration path for Nuxt content either to Docus or next version of Nuxt Content, it is not even clear if there is going to be Nuxt content with Nuxt v3 support. Will appreciate for any direction

@fabianwohlfart
Copy link

I am using Nuxt Content for all websites and a file based CMS to feed in the content. Easy to deploy, easy to back-up. Would be a pitty if there is no solution to this in Nuxt 3. For Nuxt 2 Content Module was the game changer.

@reinoldus
Copy link

reinoldus commented Nov 12, 2021

There will be a nuxt content v2.0 which will be compatible with nuxt3. I do not have the sources right now (unfortunately you have to follow every issue to have a brief understanding on what is going on), but here @pi0 said he will announce the status here: https://github.com/nuxt/framework/discussions/751#discussioncomment-1466735

@shellen
Copy link

shellen commented Nov 17, 2021

As mentioned above, Nuxt Labs CEO, Sébastien Chopin said a simple version of Nuxt Content is coming for Nuxt 3.

https://twitter.com/Atinux/status/1448221492681093124

Screen Shot 2021-11-17 at 11 29 22 AM

No ETA... yet.

Copy link
Member

atinux commented Nov 18, 2021

It's currently hard to give an ETA but the module is part of our priorities list.

@shellen
Copy link

shellen commented Nov 18, 2021

@atinux Appreciate the reply. Any chance of t-shirt sizing though - like is this weeks, months, a year away?

Also is there a roadmap of the priorities and milestones somewhere for the Nuxt 3 project? Thank you again.

@SwenVogel
Copy link

Hi, any updates, progress, or an alternative?

@NozomuIkuta
Copy link
Collaborator

Hi, any updates, progress, or an alternative?

At least as for updates and progress, they announced that official Nuxt modules including Nuxt Content v2 will be released soon.

https://twitter.com/Atinux/status/1492134684570140676?s=20&t=ShDuKa4y4QCxL5CqjwJF5w

But, I think releasing RC version of Nuxt 3 would be their first priority, so all we can do is to wait for a while.
Nuxt ecosystem, or generally OSS projects, are sustained by developers' best-efforts.

@benoitdemaegdt
Copy link

It's coming ... 🤩

https://twitter.com/atinux/status/1508793435502882824?s=21

@yongchin0821
Copy link

Looking forward to the v2 release

@benoitdemaegdt
Copy link

Nuxt content V2 is expected for end of April !
nuxt/framework#4093

@raphmarot
Copy link

I have always said that there should only be 15 days in April.

@benoitdemaegdt
Copy link

Update : https://github.com/nuxt/framework/discussions/4662#discussioncomment-2645813

@Tahul
Copy link
Contributor

Tahul commented May 3, 2022

Hey 😄

You can expect @nuxt/content v2 beta to land by this week.

See you soon. 😄

@anthonylebrun
Copy link

image

Screen Shot 2022-05-06 at 10 23 35 PM

@niklasfjeldberg
Copy link

Is there a new release yet?

@pavlexander
Copy link

pavlexander commented May 7, 2022

nuxt 3 support line appeared long before that. 5 days ago (~ May 2nd) it was slightly modified with following commit: beb1f98

According to npmjs - last release was 6 months ago: https://www.npmjs.com/package/@nuxt/content version: 1.15.1

According to official website: https://content.nuxtjs.org/releases latest version is v1.15.0 released on 10/25/2021 (p.s. one version is missing)

According to github https://github.com/nuxt/content/releases/tag/%40nuxt%2Fcontent%401.15.1 latest version is 1.15.1 release on Nov 17, 2021

So, given all of this info, I would say no. There is no new release yet as of 07.05.2022 16:34 CET

@command-tab
Copy link

https://twitter.com/Atinux/status/1523245439054606336 😍

@justindasilva
Copy link

https://twitter.com/Atinux/status/1523245439054606336 😍

That is looking really cool.
Does anyone know if there has ever been talk of supporting the idea of exporting your Nuxt content?
Would be cool to have a button that would allow you to export a PDF of the current page.

@ManasMadrecha
Copy link

ManasMadrecha commented May 8, 2022

@justindasilva If you want to export your markdown file to PDF, you can simply use VS Code's markdown-extended plugin with a theme of your choice. Or you may try Obsidian (with hundreds of theme). Both are free and extremely extremely easy to use. For a little bit advanced export, you may use Pandoc.

If you want to export your webpage with your own CSS, you may again easily just right click on your browser and print and save as PDF. You may edit your CSS with print modifiers to hide the sidebar or repeatable content, if any.

Exporting to PDF is not and should not be within the purview of Nuxt Content, which is for managing your markdown content, and querying from it.

@justindasilva
Copy link

@ManasMadrecha
So I'll just explain the use case that comes up in my case.

My workplace wants to use Nuxt Content (or Docus) to set up documentation of all of the apps that we manage. Being able to write our documentation in Markdown and have it tracked in Git and to be able to use Nuxt to make a nice looking documentation is one of the reasons we want to go with this solution.

Now, what happens at our workplace is that there are very specific content pages that other teams would like a PDF version of to send to a client. And the problem is that not everyone uses Chrome. Ideally, we would have a button on the page, that when clicked, would spit out the PDF version of that page.

There was also an ask if it was possible to spit out a fuller PDF with multiple pages, but that might be asking for too much.

I definitely understand that this functionality shouldn't be part of Nuxt Content Core, but I wonder if an extra module could help facilitate this?

@ManasMadrecha
Copy link

@justindasilva It will work with other browsers too, i.e., the print option to PDF. Just include it in your CSS to hide certain non-body elements while printing. This is the most native and easiest solution; you don't need any extra module for this.

And for multi-page printing, you can create a separate page on your website, with an input box, where people add a list of URLs of your page. Then when they click on a button, you can async generate all such pages on this page by applying a v-for to NuxtContent component, by passing all the URLs to the fetch function.

And then, print this huge page into PDF.

@reinoldus
Copy link

reinoldus commented May 10, 2022

Is there a new release yet?

I think the docs are live: https://content-v2.nuxtjs.org/

But there was no official announcement yet or did I miss it?

Edit: The getting started instructions won't work, you have to add this package:

"@nuxt/content": "npm:@nuxt/content-edge@latest",

@benoitdemaegdt
Copy link

I think Nuxt Content V2 is not yet released.

As you can see, latest version is still 1.15.1

image

@reinoldus
Copy link

reinoldus commented May 10, 2022

I think Nuxt Content V2 is not yet released.

As you can see, latest version is still 1.15.1

image

True, but what more do we need except the docs and a working package, I am playing with it right now and something renders

EDIT:
It seems to be a bit buggy though

@benoitdemaegdt
Copy link

I guess they need to prepare the release :

  • few fixes
  • write documentation
  • write the announcement
  • ...

However, according to latest tweets of Nuxt Content maintainers, the release should land very soon (coming days, maybe coming hours ?) 🤞

@lucpotage
Copy link
Sponsor

You can still try this package in the meantime: https://www.npmjs.com/package/@nuxt/content-edge

@atinux
Copy link
Member

atinux commented May 10, 2022

We are working hard on it, every day to release it :)

@samuelspagl
Copy link

I'm really looking forward to the new release, v1 was already great.
I'd like to ask one question, @atinux or anyone else from the team:
What kind of differences will there be between docus and content v2?

And thanks a lot for your creative and cool projects!!!

@atinux
Copy link
Member

atinux commented May 10, 2022

Docus will be a docs-theme based on the extends feature of Nuxt 3 directly 😊

@samuelspagl
Copy link

Nice! ☺️ Thanks a lot for your quick answer! :)

@kirtan403
Copy link

Just asking if this will also include the UI (or admin) to edit the content? As docus has been designed for that, I guess...? On your tweet also there was an editor but like, if real people can edit it to repo, like content editor or manager, something like that?

@armanivvv
Copy link

armanivvv commented May 12, 2022

The suspense is killing me...

@mblackritter
Copy link

The suspense is killing me...

@armanivvv, I for one can't even breath anymore as I'd to find distraction in Angular and @ngrx/data to narcotize me so badly for a project, that I might not experience the release of Content 2.0 anymore! 🙀 😹💦

@fabianbeier
Copy link

fabianbeier commented May 17, 2022

2 more days
image

@pavlexander
Copy link

pavlexander commented May 17, 2022

2 more days

reverse-engineering in action

Copy link
Member

atinux commented May 17, 2022

😂

@lustremedia
Copy link

https://github.com/nuxt/content/blob/a60a0365162bafb4e9a7a3335947bd6f83371aef/docs/content/5.blog/announcing-v2.md ;-)

@kirtan403
Copy link

Just asking if this will also include the UI (or admin) to edit the content? As docus has been designed for that, I guess...? On your tweet also there was an editor but like, if real people can edit it to repo, like content editor or manager, something like that?

Nuxt Admin is there and it would be coming soon!

image

image

Commit: b8ae700

@gcubeda
Copy link

gcubeda commented May 23, 2022

Looking forward to vuejs.amsterdam!

@kirtan403
Copy link

It's live ! https://twitter.com/nuxt_js/status/1529161019112800256

@nathanreyes
Copy link

This may help someone else. I had some issues when running that were fixed when I updated nuxt from 3.0.0-rc.1 to 3.0.0-rc.3.

@cco3
Copy link

cco3 commented May 25, 2022

Fresh install with nuxt 3.0.0-rc.3:

ERROR  [worker reload] [worker init] Named export 'parseEntities' not found. The requested module 'file:///home/.../node_modules/parse-entities/index.js' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'file:///home/.../node_modules/parse-entities/index.js';
const { parseEntities } = pkg;


 import { parseEntities } from 'node_modules/parse-entities/index.js';
 ^^^^^^^^^^^^^
 SyntaxError: Named export 'parseEntities' not found. The requested module 'node_modules/parse-entities/index.js' is a CommonJS module, which may not support all module.exports as named exports.
 CommonJS modules can always be imported via the default export, for example using:
 
 import pkg from 'node_modules/parse-entities/index.js';
 const { parseEntities } = pkg;
 
 at ModuleJob._instantiate (node:internal/modules/esm/module_job:128:21)
 at async ModuleJob.run (node:internal/modules/esm/module_job:194:5)
 at async Promise.all (index 0)
 at async ESMLoader.import (node:internal/modules/esm/loader:385:24)
 at async loadESM (node:internal/process/esm_loader:88:5)
 at async handleMainPromise (node:internal/modules/run_main:61:12)

Would appreciate any pointers!

@atinux
Copy link
Member

atinux commented May 25, 2022

@cco3

Try by running yarn upgrade, otherwise you can fix it by using the resolutions field in your package.json:

"resolutions": {
  "parse-entities": "^4.0.0"
}

@cco3
Copy link

cco3 commented May 25, 2022

Hm, the latter one worked, but I'm surprised because I had already manually verified parse-entities was at 4.0.0. Either I missed something or something else was going on.

Anyway, thanks!

Update: I went ahead and reproduced the original issue. Sure enough:

grep version node_modules/@nuxt/content/node_modules/parse-entities/package.json 
  "version": "4.0.0"

I don't understand why setting "resolutions" explicitly changes anything.

Update 2: That wasn't the module that was getting loaded...so that explains it.

@praburangki
Copy link

praburangki commented Jul 16, 2022

By adding the resolutions solves the issues.
But it breaks the eslint-plugin-markdown, I believe they are dependent on the v2 parse-entities.

cc @atinux

@mklueh
Copy link

mklueh commented Aug 23, 2022

Also running into this one after adding the resolutions as well


 ERROR  [worker reload] [worker init] require() of ES Module /home/user/workspace/my-app/node_modules/parse-entities/index.js from /home/user/workspace/my-app/node_modules/remark-parse/lib/decode.js not supported.
Instead change the require of index.js in /home/user/workspace/my-app/node_modules/remark-parse/lib/decode.js to a dynamic import() which is available in all CommonJS modules.

  Instead change the require of index.js in /home/user/workspace/my-app/node_modules/remark-parse/lib/decode.js to a dynamic import() which is available in all CommonJS modules.
  at Object.<anonymous> (/home/user/workspace/my-app/node_modules/remark-parse/lib/decode.js:4:16)
  at Object.<anonymous> (/home/user/workspace/my-app/node_modules/remark-parse/lib/parser.js:7:14)
  at Object.<anonymous> (/home/user/workspace/my-app/node_modules/remark-parse/index.js:5:14)
  at async Promise.all (index 0)

@barayuda
Copy link

barayuda commented Sep 6, 2022

By adding the resolutions solves the issues. But it breaks the eslint-plugin-markdown, I believe they are dependent on the v2 parse-entities.

cc @atinux

Sorry open this discussion again @atinux , same as last comment from @praburangki
I got this:

Error: Failed to load plugin 'markdown' declared in '.eslintrc » @antfu/eslint-config » @antfu/eslint-config-react » @antfu/eslint-config-ts » @antfu/eslint-config-basic': Cannot find module 'parse-entities/decode-entity.js'
Require stack:
- /opt/Projects/my-app/node_modules/eslint-plugin-markdown/node_modules/micromark/dist/tokenize/character-reference.js
- /opt/Projects/my-app/node_modules/eslint-plugin-markdown/node_modules/micromark/dist/constructs.js
- /opt/Projects/my-app/node_modules/eslint-plugin-markdown/node_modules/micromark/dist/parse.js
- /opt/Projects/my-app/node_modules/eslint-plugin-markdown/node_modules/mdast-util-from-markdown/dist/index.js
- /opt/Projects/my-app/node_modules/eslint-plugin-markdown/node_modules/mdast-util-from-markdown/index.js
- /opt/Projects/my-app/node_modules/eslint-plugin-markdown/lib/processor.js
- /opt/Projects/my-app/node_modules/eslint-plugin-markdown/lib/index.js
- /opt/Projects/my-app/node_modules/eslint-plugin-markdown/index.js
- /opt/Projects/my-app/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
Referenced from: /opt/Projects/my-app/node_modules/@antfu/eslint-config-basic/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
    at Function.Module._load (node:internal/modules/cjs/loader:804:27)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/opt/Projects/my-app/node_modules/eslint-plugin-markdown/node_modules/micromark/dist/tokenize/character-reference.js:3:20)
    at Module._compile (node:internal/modules/cjs/loader:1126:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
    at Module.load (node:internal/modules/cjs/loader:1004:32)
    at Function.Module._load (node:internal/modules/cjs/loader:839:12)
    at Module.require (node:internal/modules/cjs/loader:1028:19)

cc @antfu I used your eslint setup along with nuxt/content, that I missed something?

thanks in advance

Copy link
Member

atinux commented Sep 6, 2022

Please open a new issue with a reproduction instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests