Composition-api: fix: Failed to start nuxt.

Created on 27 Jul 2021  ·  4Comments  ·  Source: nuxt-community/composition-api

🐛 The bug
Failed to start nuxt.
It starts correctly with @nuxtjs/composition-api version 0.24.7, but not with 0.25.1.

✖ Nuxt Fatal Error 
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath
'./dist/vue-composition-api.esm.js' is not defined by
"exports" in /workspace/my_projects/node_modules/@vue/composition-api/package.json

🛠️ To reproduce
Steps to reproduce the behavior:

  1. Install @nuxtjs/composition-api with version 0.25.1
  2. Set @nuxtjs/composition-api in buildModules
  3. Start nuxt.

Environment:

  • nuxt: 2.15.7
  • @nuxtjs/composition-api: 0.25.1
  • node: 12.18.4
  • npm: 6.14.6

🌈 Expected behaviour
I hope that nuxt will work correctly as in version 0.24.7.

bug needs-repro

All 4 comments

@masayuki-tsuji What is your version of @vue/composition-api? Here's a working reproduction.

@danielroe The version of @vue/composition-api is 1.0.4.

@masayuki-tsuji You may simply need to upgrade your version of Node to a newer v12 with support for subpath exports with patterns. But if that doesn't work, would you provide a reproduction? :pray:

@danielroe
I upgraded node from v12.18.4 to the latest v12.22.3 and that solved the problem.
Thank you very much!

Was this page helpful?
0 / 5 - 0 ratings