question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesn't work with Nuxt 3 rc.1 in production build

See original GitHub issue

Environment

------------------------------
- Operating System: `Darwin`
- Node Version:     `v17.4.0`
- Nuxt Version:     `3.0.0-rc.1`
- Package Manager:  `npm@8.3.1`
- Builder:          `vite`
- User Config:      `buildModules`, `ui`
- Runtime Modules:  `-`
- Build Modules:    `@nuxtjs/supabase@0.1.9`, `@nuxthq/ui@0.0.2-27508221.57354f6`, `@nuxtjs/color-mode@3.0.2`
------------------------------

Reproduction Link

Official demo: https://github.com/nuxt-community/supabase-module/tree/main/demo

Steps to reproduce

  1. Upgrade Nuxt to 3.0.0-rc.1 (official migration guide: https://github.com/nuxt/framework/discussions/4479)
  2. npm run build
  3. npm start

What is actually happening?

Listening on http://0.0.0.0:3000/
[nuxt] [request error] require() of ES Module supabase-module/demo/.output/server/node_modules/node-fetch/src/index.js from supabase-module/demo/.output/server/node_modules/cross-fetch/dist/node-ponyfill.js not supported.
Instead change the require of index.js in supabase-module/demo/.output/server/node_modules/cross-fetch/dist/node-ponyfill.js to a dynamic import() which is available in all CommonJS modules.
  at Object.<anonymous> (./.output/server/node_modules/cross-fetch/dist/node-ponyfill.js:1:19)  
  at async Promise.all (index 0)  
  at async ./.output/server/chunks/handlers/renderer.mjs:544:24  
  at async ./.output/server/chunks/handlers/renderer.mjs:601:20  
  at async ./.output/server/node_modules/h3/dist/index.mjs:417:19  
  at async Server.nodeHandler (./.output/server/node_modules/h3/dist/index.mjs:367:7)

In my private project, I have the same problem after building the app. But everything (user/auth & client) works fine in dev mode.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
larbishcommented, May 6, 2022

@lukaszflorczak For the moment, you should stay with nuxt-rc.1 => https://github.com/nuxt/framework/releases/tag/v3.0.0-rc.2.

However, I just upgrade the module deps and it works on pnpm and yarn for me with the rc.1. You can try with the last published version 0.1.11 of the module. I’ll keep the module updated (and try with pnpm) as soon as the new rc is available.

0reactions
lukaszflorczakcommented, May 5, 2022

Today I tried Nuxt 3 rc.2 and I have the same error also on pnpm. It looks like only yarn is working.

Read more comments on GitHub >

github_iconTop Results From Across the Web

can not start production build of nuxt 3 · Issue #1576 - GitHub
Describe the bug. can not start production build of nuxt 3.... in dev mode all works fine. Nuxt: Nuxt CLI v3.0.0-rc.2-27530889.9e5a3cd
Read more >
Should I use Nuxt 3 RC in my new production project? - Reddit
I'm already using nuxt 3 RC in production. i18n module is not stable yet but with few workarounds it works.
Read more >
nuxt.js - Not able to preview NuxtJs3 build - Stack Overflow
My Nuxt 3 Project is suddenly giving me some error after release of 3.0.0-rc.5, it used to work well and now i am...
Read more >
Announcing Nuxt 3 Release Candidate
Nuxt 3 beta was announced on October 12, 2021 after 16 months of work, introducing a new foundation based on Vue 3, Vite...
Read more >
Nuxt 3 build logs "unable to compile TypeScript" - Support
Nuxt 3 build fails as it seems to have any weird issues with the package ... git clone https://github.com/p3t3r67x0/nuxt-rc-netlify 1:45:45 PM: Preparing ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found