NuxtN
Nuxt4mo ago
6 replies
oussamalkd

Cannot find module '@vue/shared' when running node .output/server/index.mjs after Nuxt 4 build

Hi 👋
I built my Nuxt 4 app using:

nuxi build


Then I tried to run it for testing with:

node .output/server/index.mjs


but I get:

Error: Cannot find module '@vue/shared'
Require stack:
- .output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js


I didn’t include the node_modules folder because according to the Nuxt docs
and a video from @danielroe it should be enough to deploy only the .output folder.
Was this page helpful?