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

PNPM support: Server Side Rendering Error: TypeError: Cannot read properties of undefined (reading '__nuxt_plugin') #11888

Closed
Hebilicious opened this issue Oct 12, 2021 · 1 comment

Comments

@Hebilicious
Copy link
Member

Hebilicious commented Oct 12, 2021

Environment


  • Operating System: Linux
  • Node Version: v16.11.1
  • Nuxt Version: 3-3.0.0-27234211.2a0afbd
  • Package Manager: Yarn
  • Bundler: Webpack
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Describe the bug and expected behavior

PNPM errors on launch : First, some of the packages needs to be explicitly imported/hoisted, then there's an SSR errors due to the plugins array having an undefined element in.

The node errors looks like this

Server Side Rendering Error: TypeError: Cannot read properties of undefined (reading '__nuxt_plugin')
    at isLegacyPlugin (file:///test-nuxt3/.nuxt/dist/server/server.mjs:210:17)
    at file:///test-nuxt3/.nuxt/dist/server/server.mjs:192:9
    at Array.map (<anonymous>)
    at Module.normalizePlugins (file:///test-nuxt3/.nuxt/dist/server/server.mjs:191:28)
    at $id_df31ce3d (file:///test-nuxt3/.nuxt/dist/server/server.mjs:28:39)
    at async __instantiateModule__ (file:///test-nuxt3/.nuxt/dist/server/server.mjs:1781:3)

Steps to reproduce

npx nuxi init test-pnpm
cd test-pnpm 
pnpm i --shamefully-hoist
pnpm dev

Additional context

Using npm works, altough for my personal use-case (pnpm workspace), pnpm support is very desirable.
Congratulations on the release 🎉

@pi0
Copy link
Member

pi0 commented Oct 12, 2021

Hi @Hebilicious and thanks for testing Nuxt 3 ❤️ Currently for several issues, pnp and pnpm are not supported (yarn pnp experiment: nuxt/framework#685). Please subscribe to #11823 keep track of this.

@pi0 pi0 closed this as completed Oct 12, 2021
@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants