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

SSR new project failed to run - Invalid value used as weak map key #11372

Closed
2 of 14 tasks
eladcandroid opened this issue Nov 16, 2021 · 4 comments
Closed
2 of 14 tasks
Labels
bug/0-needs-info Need more info to reproduce Qv2 🔝 Quasar v2 issues

Comments

@eladcandroid
Copy link

eladcandroid commented Nov 16, 2021

Describe the bug
TypeError (500)
Invalid value used as weak map key

TypeError: Invalid value used as weak map key at WeakMap.set (<anonymous>) at normalizePropsOptions (/Users/elad/dev/quasar/check/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:2654:15) at createComponentInstance (/Users/elad/dev/quasar/check/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:6120:23) at renderComponentVNode (/Users/elad/dev/quasar/check/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:197:22) at ssrRenderComponent (/Users/elad/dev/quasar/check/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:623:12) at ssrRender (render-app.js:221:80) at renderComponentSubTree (/Users/elad/dev/quasar/check/node_modules/@quasar/app/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:263:13) at renderComponentVNode (/Users/elad/dev/quasar/check/node_modules/@quasar/app/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:214:16) at renderVNode (/Users/elad/dev/quasar/check/node_modules/@quasar/app/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:304:22) at renderComponentSubTree (/Users/elad/dev/quasar/check/node_modules/@quasar/app/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:269:13)

To Reproduce
Steps to reproduce the behavior:

  1. quasar create checkproj
  2. cd checkproj
  3. quasar run dev -m=ssr

Expected behavior
Running project...

Screenshots
image

Platform (please complete the following information):
Quasar Version:
@quasar/app Version: 3.2.2

Quasar mode:

  • SPA
  • SSR
  • PWA
  • Electron
  • Cordova
  • Capacitor
  • BEX

Tested on:

  • SPA
  • SSR
  • PWA
  • Electron
  • Cordova
  • Capacitor
  • BEX

OS: MacBook Pro (13-inch, M1, 2020)
Node: 17.0.1
NPM: 8.1.0

@eladcandroid eladcandroid added the Qv2 🔝 Quasar v2 issues label Nov 16, 2021
@rstoenescu
Copy link
Member

Cannot reproduce.
What options did you pick when creating the project?

@rstoenescu rstoenescu added the bug/0-needs-info Need more info to reproduce label Nov 16, 2021
@eladcandroid
Copy link
Author

@rstoenescu
Sass with SCSS syntax

ESLint
Vuex
Axios

ESlint Preset:
Prettier

NPM

You can put console.log here and see that there's some problem with router-view component:
node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:2654:15

When I replaced router-view with a simple div, the error was gone (but not with other Vue component).

@eladcandroid
Copy link
Author

New & important one:
The bug is related to npm (My version: 8.1.0, Both Node 16/17).
With Yarn (1.22.17) everything goes well.

@hawkeye64
Copy link
Member

@eladcandroid Hi. It is advisable to never use an odd-versioned version of Node, as they are considered experimental and highly recommended not to be used for production. Basically, it's a springboard for the next even-versioned version of Node.

image

Also, there seems to be a number of issues coming from Npm 8.x and if at all possible, stick with Yarn for local dependency management, and if using something like Nvm, then use Npm for global dependency management. This has been our recommendation for years and has solved many issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/0-needs-info Need more info to reproduce Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

No branches or pull requests

3 participants