Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Nuxt content support #14

Closed
odanado opened this issue Feb 25, 2021 · 2 comments
Closed

Nuxt content support #14

odanado opened this issue Feb 25, 2021 · 2 comments
Labels

Comments

@odanado
Copy link

odanado commented Feb 25, 2021

Using nuxt/content together will result in an error.

 ERROR  'default' is not exported by .nuxt/content/query-builder.js, imported by .nuxt/content/plugin.client.js


 ERROR  file: /Users/odan/source/github.com/odan-sandbox/nuxt-vite-with-content-bug/.nuxt/content/plugin.client.js:3:7


 ERROR  1: import Vue from 'vue'                                                    08:10:55
2: import NuxtContent from './nuxt-content.dev'
3: import QueryBuilder from './query-builder'
          ^
4: 
5: Vue.component(NuxtContent.name, NuxtContent)


 ERROR  Server compiled with errors: 'default' is not exported by .nuxt/content/query-builder.js, imported by .nuxt/content/plugin.client.js

  at error (node_modules/rollup/dist/shared/rollup.js:5275:30)
  at Module.error (node_modules/rollup/dist/shared/rollup.js:9992:16)
  at Module.traceVariable (node_modules/rollup/dist/shared/rollup.js:10385:29)
  at ModuleScope.findVariable (node_modules/rollup/dist/shared/rollup.js:8843:39)
  at ReturnValueScope.findVariable (node_modules/rollup/dist/shared/rollup.js:2637:38)
  at ChildScope.findVariable (node_modules/rollup/dist/shared/rollup.js:2637:38)
  at FunctionScope.findVariable (node_modules/rollup/dist/shared/rollup.js:2637:38)
  at ChildScope.findVariable (node_modules/rollup/dist/shared/rollup.js:2637:38)
  at Identifier$1.bind (node_modules/rollup/dist/shared/rollup.js:4013:40)
  at NewExpression$1.bind (node_modules/rollup/dist/shared/rollup.js:2724:23)
  at NewExpression$1.bind (node_modules/rollup/dist/shared/rollup.js:8100:15)
  at ReturnStatement$1.bind (node_modules/rollup/dist/shared/rollup.js:2724:23)
  at BlockStatement$1.bind (node_modules/rollup/dist/shared/rollup.js:2720:31)
  at FunctionExpression.bind (node_modules/rollup/dist/shared/rollup.js:2724:23)
  at VariableDeclarator.bind (node_modules/rollup/dist/shared/rollup.js:2724:23)
  at VariableDeclaration.bind (node_modules/rollup/dist/shared/rollup.js:2720:31)

Reproduction repository is here: https://github.com/odan-sandbox/nuxt-vite-with-content-bug

@odanado odanado changed the title Nuxt content support. Nuxt content support Feb 25, 2021
@pi0 pi0 added the module label Feb 25, 2021
@pi0
Copy link
Member

pi0 commented Feb 26, 2021

Thanks for reporting issue. We need to solve this problem in upstream. Manually patching query-builder.js template to use export default, we have another SSR problem ($content is not a function)

@pi0
Copy link
Member

pi0 commented Mar 9, 2021

Conent module should be supported in latest version.

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

No branches or pull requests

2 participants