-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Reproduction
It was not possible to reproduce the problem in the sandbox
Steps to reproduce the bug
On the Nuxt project https://nuxt.com/modules/pinia is installed. I installed versions upper than 0.7.0, and when building I get an error:
[nuxi 09:58:21] ERROR Nuxt Build Error: [vite]: Rollup failed to resolve import "pinia" from "/node_modules/@pinia/nuxt/dist/runtime/payload-plugin.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external
at viteLog (/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:46345:15)
at onRollupLog (/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:46395:5)
at onLog (/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:46043:7)
at /node_modules/rollup/dist/es/shared/node-entry.js:20765:32
at Object.logger [as onLog] (/node_modules/rollup/dist/es/shared/node-entry.js:22644:9)
at ModuleLoader.handleInvalidResolvedId (//node_modules/rollup/dist/es/shared/node-entry.js:21391:26)
at /node_modules/rollup/dist/es/shared/node-entry.js:21349:26
error Command failed with exit code 1
Removing yarn.lock, node_modules and add 'pinia' to
build.rollupOptions.external does not help.
Expected behavior
The build runs without error.
Actual behavior
The build runs with error.
Additional information
Discussion started at nuxt/nuxt#29624
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels