'setupDevtoolsPlugin' is not exported by `unenv`
See original GitHub issueEnvironment
NUXT 3 : 3.0.0-27497374.59593a0 NODE : 16.4.2 pnpm": “^6.32.3”
Reproduction
.
Describe the bug
when normaly build its fine.
Additional context
my nuxt config not set preset. when im build NITRO_PRESET=cloudflare pnpm build.
Logs
Error like this:
ERROR Rollup error: 'setupDevtoolsPlugin' is not exported by node_modules/.pnpm/unenv@0.4.6/node_modules/unenv/runtime/mock/proxy.mjs, imported by node_modules/.pnpm/pinia@2.0.13_d3195e5b5ca92757b2890fe178df3bd1/node_modules/pinia/dist/pinia.mjs
ERROR 'setupDevtoolsPlugin' is not exported by node_modules/.pnpm/unenv@0.4.6/node_modules/unenv/runtime/mock/proxy.mjs, imported by node_modules/.pnpm/pinia@2.0.13_d3195e5b5ca92757b2890fe178df3bd1/node_modules/pinia/dist/pinia.mjs
at error (node_modules/.pnpm/rollup@2.70.1/node_modules/rollup/dist/es/shared/rollup.js:1784:30)
at Module.error (node_modules/.pnpm/rollup@2.70.1/node_modules/rollup/dist/es/shared/rollup.js:12345:16)
at Module.traceVariable (node_modules/.pnpm/rollup@2.70.1/node_modules/rollup/dist/es/shared/rollup.js:12703:29)
at ModuleScope.findVariable (node_modules/.pnpm/rollup@2.70.1/node_modules/rollup/dist/es/shared/rollup.js:11333:39)
at FunctionScope.findVariable (node_modules/.pnpm/rollup@2.70.1/node_modules/rollup/dist/es/shared/rollup.js:6301:38)
at ChildScope.findVariable (node_modules/.pnpm/rollup@2.70.1/node_modules/rollup/dist/es/shared/rollup.js:6301:38)
at Identifier.bind (node_modules/.pnpm/rollup@2.70.1/node_modules/rollup/dist/es/shared/rollup.js:7592:40)
at CallExpression.bind (node_modules/.pnpm/rollup@2.70.1/node_modules/rollup/dist/es/shared/rollup.js:5166:23)
at CallExpression.bind (node_modules/.pnpm/rollup@2.70.1/node_modules/rollup/dist/es/shared/rollup.js:8774:15)
at ExpressionStatement.bind (node_modules/.pnpm/rollup@2.70.1/node_modules/rollup/dist/es/shared/rollup.js:5166:23)
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:43 (20 by maintainers)
Top Results From Across the Web
How do I fix "the requested module does not provide an export ...
The reason it didn't work is that Vue provides a named export, whereas you are trying to import it as though it had...
Read more >ES Modules · Nuxt Concepts
For example, when you import sample-library , Node.js will look not for the main but for the exports or module entry in that...
Read more >@zamiell/typedoc-plugin-not-exported - npm
This TypeDoc plugin can force inclusion of specific symbols (variables) that are not exported, by making them fake exports.
Read more >Common Issues - Nuxt Vite
Uncaught SyntaxError: The requested module ... does not provide an export named 'default'. Vite has an issue for pre-bundling dependencies ...
Read more >TIL: Requiring a File that Isn't Exported by a Node Module
I spent easily an hour looking for some sort of guide, digging through the Lodash source on github (not fruitful because their repo...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The cause is that pinia imports
setupDevtoolsPlugin
from@vue/devtools-api
. We deliberately stub out vue devtools on the server. So rollup, in trying to inline this function, fails.As a workaround, you can do:
Just upgraded to
v3.0.0-rc.8-27679173.c688e18
and it’s working!@danielroe @pi0 Thank you so much for this blazing fast fix!