posva / mande

<700 bytes convenient and modern wrapper around fetch with smart extensible defaults
https://mande.esm.is
MIT License
1.19k stars 42 forks source link

ERR_PACKAGE_PATH_NOT_EXPORTED when trying to use nuxt 2 module #474

Open ceigh opened 4 months ago

ceigh commented 4 months ago

Hi, first of all, thanks for the cool module!

I'm trying to implement it in my nuxt 2 project, I got to the point about connecting the module to buildModules: https://github.com/posva/mande?tab=readme-ov-file#nuxt-2

// nuxt.config.js
module.exports = {
  buildModules: ['mande/nuxt'],
}

But it looks like something is wrong with the exports in the package, and I can't run the build (or dev):

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './nuxt' is not defined by "exports" in /home/projects/mande-nuxt/node_modules/mande/package.json
Package Version
mande 2.0.9
nuxt 2.17.3
node 20.13.1

Here's a small reproduction: https://stackblitz.com/edit/mande-nuxt ✌️