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: │ 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:
opened 01:46PM - 16 Dec 20 UTC
closed 02:18PM - 16 Dec 20 UTC
bug-report
2.x
I suddenly start receiving this error starting several minutes ago while deployi… ng on Openshift. Before, everything was perfectly fine. The only difference between the build that worked several minutes prior and current build are some minor layout changes and added two functions that had console.log in them, so I'm pretty sure it is not my fault but something with Nuxt, especially the ufo module.
FATAL Package subpath './package.json' is not defined by "exports" in /usr/src/flipit-frontend/node_modules/@nuxt/ufo/package.json
|
| at throwExportsNotFound (internal/modules/esm/resolve.js:285:9)
| at packageExportsResolve (internal/modules/esm/resolve.js:508:3)
| at resolveExports (internal/modules/cjs/loader.js:424:36)
| at Function.Module._findPath (internal/modules/cjs/loader.js:464:31)
| at Function.Module._resolveFilename (internal/modules/cjs/loader.js:802:27)
| at Function.Module._load (internal/modules/cjs/loader.js:667:27)
| at Module.require (internal/modules/cjs/loader.js:887:19)
| at require (internal/modules/cjs/helpers.js:74:18)
| at Resolver.requireModule (node_modules/@nuxt/core/dist/core.js:618:26)
| at Builder.validateTemplate (node_modules/@nuxt/builder/dist/builder.js:5674:38)
| at Builder.build (node_modules/@nuxt/builder/dist/builder.js:5602:12)
| at async Generator.initiate (node_modules/@nuxt/generator/dist/generator.js:171:7)
| at async Generator.generate (node_modules/@nuxt/generator/dist/generator.js:133:5)
| at async Object.run (node_modules/@nuxt/cli/dist/cli-build.js:105:7)
| at async NuxtCommand.run (node_modules/@nuxt/cli/dist/cli-index.js:2803:7)
|
Was there a new version or a change or something a couple minutes ago that could've caused this? Thanks in advance for the help!
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.