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

set up nuxt example #101

Open
mesqueeb opened this issue Dec 19, 2022 · 9 comments
Open

set up nuxt example #101

mesqueeb opened this issue Dec 19, 2022 · 9 comments

Comments

@mesqueeb
Copy link
Member

mesqueeb commented Dec 19, 2022

  • set up nuxt example
  • can be added as dev-nuxt-firestore in the packages folder
  • can be based on the dev-vue3-firestore code, which is a minimal use case of magnetar with Vue 3.

image

@kazupon
Copy link
Collaborator

kazupon commented Jan 21, 2023

working at nuxt branch
https://github.com/CyCraft/magnetar/tree/nuxt

@kazupon
Copy link
Collaborator

kazupon commented Jan 21, 2023

I start to work today (1/21)

@kazupon
Copy link
Collaborator

kazupon commented Jan 21, 2023

ERROR Cannot set properties of undefined (setting 'id')

Hmm, This error is occuring in @vitejs/plugin-vue:

$ DEBUG=* pnpm dev:nuxt-firestore
 ERROR  Cannot set properties of undefined (setting 'id')                                                                                   19:41:24

› Warmup for /@fs/path/to/CyCraft/magnetar/node_modules/.pnpm/[email protected]/node_modules/nuxt/dist/app/components/nuxt-root.vue failed with: Cannot set properties of undefined (setting 'id')

  at createDescriptor (/path/to/CyCraft/magnetar/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@vitejs/plugin-vue/dist/index.mjs:67:17)
  at transformMain (/path/to/CyCraft/magnetar/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@vitejs/plugin-vue/dist/index.mjs:2213:34)
  at TransformContext.transform (/path/to/CyCraft/magnetar/node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@vitejs/plugin-vue/dist/index.mjs:2702:16)
  at Object.transform (/path/to/CyCraft/magnetar/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-5605cfa4.js:40534:44)
  at async loadAndTransform (/path/to/CyCraft/magnetar/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-5605cfa4.js:36921:29)

@kazupon
Copy link
Collaborator

kazupon commented Jan 21, 2023

Okay, I've gotten the cause of the error. multiple @vue/compiler-sfc versions was installed in repo

  /@vue/compiler-sfc/2.7.14:
    resolution: {integrity: sha512-aNmNHyLPsw+sVvlQFQ2/8sjNuLtK54TC6cuKnVzAY93ks4ZBrvwQSnkkIh7bsbNhum5hJBS00wSDipQ937f5DA==}
    dependencies:
      '@babel/parser': 7.20.7
      postcss: 8.4.21
      source-map: 0.6.1

  /@vue/compiler-sfc/3.2.45:
    resolution: {integrity: sha512-1jXDuWah1ggsnSAOGsec8cFjT/K6TMZ0sPL3o3d84Ft2AYZi2jWJgRMjw4iaK0rBfA89L5gw427H4n1RZQBu6Q==}
    dependencies:
      '@babel/parser': 7.20.7
      '@vue/compiler-core': 3.2.45
      '@vue/compiler-dom': 3.2.45
      '@vue/compiler-ssr': 3.2.45
      '@vue/reactivity-transform': 3.2.45
      '@vue/shared': 3.2.45
      estree-walker: 2.0.2
      magic-string: 0.25.9
      postcss: 8.4.21
      source-map: 0.6.1

When we start pnpm dev:nuxt-firestore, @vue/compiler-sfc/2.7.14 is loaded in nuxt.

The deps of dev-vue2-firestore should not be hoisted to root.

@kazupon
Copy link
Collaborator

kazupon commented Jan 21, 2023

I stop to work for house chores (1/21) 2:25

@kazupon
Copy link
Collaborator

kazupon commented Jan 29, 2023

I start to work today (1/29)

I'll remove dev-vue2-firestore from magnetar monorepo

@kazupon kazupon mentioned this issue Jan 29, 2023
@kazupon
Copy link
Collaborator

kazupon commented Jan 29, 2023

I've stopped to work today. 2.5 h
I've set up initialize magnetar on Nuxt
842d58b

@kazupon
Copy link
Collaborator

kazupon commented Jan 31, 2023

I start to work today (1/31)

@kazupon
Copy link
Collaborator

kazupon commented Jan 31, 2023

I've stopped to work today. 1.5 h

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

No branches or pull requests

2 participants