Amrit
Amrit
NNuxt
Created by Amrit on 4/12/2024 in #❓・help
Installing module from npm causes does not provide an export named 'default' issue
Hello! First of all here is the error:
The requested module '/_nuxt/node_modules/.pnpm/[email protected]/node_modules/debug/src/browser.js?v=f2a9d9a8' does not provide an export named 'default'
The requested module '/_nuxt/node_modules/.pnpm/[email protected]/node_modules/debug/src/browser.js?v=f2a9d9a8' does not provide an export named 'default'
I'm trying to create the nuxt module for Scalar API References. You can find the code for the module here: https://github.com/scalar/scalar/tree/main/packages/nuxt. It works fine in the playground and when I'm testing. However when I either use pnpm pack or release the package to NPM and install it a fresh Nuxt app, it gives me this error. Also the error does not exist in prod, its only in development. I looked into the debug package and it does not support esm at all. Now I'm not sure how its working in the playground, not to mention in the countless esm apps the depend on it. Am I missing something in the build config? I tried with and without that transpiling and it has the same issue. Also I have been manually releasing to npm as well as testing with pnpm pack, our CI isn't setup for nuxt modules quite yet.
6 replies