How can I deploy a Shopware PWA app?

I have been trying to deploy a Shopware PWA app based on nuxtJs for 2 days.

When building I later get the following error message and locally it works fine:

… is not defined by “exports” in /opt/build/repo/node_modules/@vue/composition-api/package.json

Hey there @devgio81 Welcome to Netlify forums!

Writing a detailed post will help us solve your issue faster, generally speaking we need this:

  • Netlify Domain (.netlify.app)
  • Git Repo if you have one
  • Latest deploy logs (either copy and pasted or linked to)

Kyle.

8:47:34 PM: at fulfilled (node_modules/@shopware-pwa/nuxt-module/dist/nuxt-module.cjs.js:48:24)
8:47:34 PM:
8:47:34 PM: ╭────────────────────────────────────────────────────────────────────────╮
8:47:34 PM: │ │
8:47:34 PM: │ :heavy_multiplication_x: Nuxt Fatal Error │
8:47:34 PM: │ │
8:47:34 PM: │ Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath │
8:47:34 PM: │ ‘./dist/vue-composition-api.esm.js’ is not defined by “exports” in │
8:47:34 PM: │ /opt/build/repo/node_modules/@vue/composition-api/package.json │
8:47:34 PM: │ │
8:47:34 PM: ╰────────────────────────────────────────────────────────────────────────╯
8:47:34 PM:
8:47:34 PM: error Command failed with exit code 1.
8:47:34 PM: info Visit yarn run | Yarn for documentation about this command.
8:47:34 PM: /opt/build/repo/node_modules/gluegun/build/index.js:13
8:47:34 PM: throw up;
8:47:34 PM: ^
8:47:34 PM: Error: Unable to build project
8:47:34 PM: at Command.run (/opt/build/repo/node_modules/@shopware-pwa/cli/build/commands/build.js:19:13)
8:47:34 PM: at processTicksAndRejections (internal/process/task_queues.js:97:5)
8:47:34 PM: error Command failed with exit code 1.
8:47:34 PM: info Visit yarn run | Yarn for documentation about this command.
8:47:34 PM: ​
8:47:34 PM: ────────────────────────────────────────────────────────────────
8:47:34 PM: “build.command” failed
8:47:34 PM: ────────────────────────────────────────────────────────────────
8:47:34 PM: ​
8:47:34 PM: Error message
8:47:34 PM: Command failed with exit code 1: yarn build
8:47:34 PM: ​
8:47:34 PM: Error location
8:47:34 PM: In Build command from Netlify app:
8:47:34 PM: yarn build
8:47:34 PM: ​
8:47:34 PM: Resolved config
8:47:34 PM: build:
8:47:34 PM: command: yarn build
8:47:34 PM: commandOrigin: ui
8:47:34 PM: publish: /opt/build/repo/dist
8:47:34 PM: publishOrigin: ui
8:47:34 PM: Caching artifacts

Hi @devgio81,

This problem can be caused by NuxtJS or one of its dependencies. You might want to try updating everything to the latest to be sure. If you don’t think that’s it, please share the repo so others can check too.

Reference:

Hey,

I am developing for a client and can´t share the repo because it is set to private.
The building runs locally on a Mac without problems.

Hi @devgio81,

Without a repo, we can’t test and thus we have no idea what might be causing the issue. Any simple repo which can reproduce the issue as yours would do the job.

Same error, but with a different package, was resolved in Error [ERR_PACKAGE_PATH_NOT_EXPORTED] · Issue #7 · unjs/ufo · GitHub with a NuxtJS upgrade. In vuejs/core · Discussions · GitHub it was resolved by ensuring the plugin was at the latest version.