could not resolve vue-demi (Nuxt 3 deployment on netlify)
See original GitHub issueHi team,
got this error when trying to deploying (for testing) a Nuxt 3 app with vue-use
4:25:43 PM: > .netlify/functions-internal/server/node_modules/@vueuse/shared/index.mjs:636:14: error: Could not resolve "vue-demi" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time) 4:25:43 PM: 636 │ require("vue-demi").set(...args); 4:25:43 PM: ╵ ~~~~~~~~~~ 4:25:43 PM: .netlify/functions-internal/server/node_modules/vue-demi/package.json:18:17: note: The module "./lib/index.cjs" was not found on the file system 4:25:43 PM: 18 │ "require": "./lib/index.cjs", 4:25:43 PM: ╵ ~~~~~~~~~~~~~~~~~ 4:25:43 PM:
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Nuxt 3 Deploy Failed: Rollup failed to resolve import "vue"
Hi all, I've been trying to deploy a Nuxt 3 app for the past few hours, but all attempts are failing. The app...
Read more >Dependency issue with @nuxtjs/composition-api #76 - GitHub
I'm trying to use @vueuse/core with @nuxtjs/composition-api in my Nuxt project. And I get a error message: This dependency was not found: *...
Read more >Issue deploying Nuxt static site to Netlify using Github
The issue was that you try to deploy with your local server on Netlify. You'll need to deploy the backend too.
Read more >Views on Vue - Podcast Addict
New Nuxt 3 Features and the Nuxt 3 Community with Daniel Roe - VUE 188 ... Valeri- Mastering JS Valeri- Will Wight: Books...
Read more >nuxt: Versions | Openbase
Nuxt's documentation is now written with Nuxt 3's new theming system and the latest Docus ... Issues with vite HMR and vite-node should...
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
hacky fix: change Netlify’s build command to
yarn build && cp node_modules/vue-demi/lib/index.cjs .netlify/functions-internal/server/node_modules/vue-demi/lib/index.cjs
. which copyindex.cjs
from root node-modules to server node_modules.@antfu seems like when we build .output/ locally with nitro (which is trim by
@vercel/nft
to keep only used files in node_module?),.output/server/vue-demi/lib/index.cjs
was kept. But when build on Netlify,.output/server/vue-demi/lib/index.mjs
was kept instead of .cjs (cause by change of import/require statement difference locally vs on Netlify?)not sure why it’s the case, maybe someone knows more about module system could help. Thanks!
@didavid61202 your hacky fix worked indeed for me thanks 😃