Does anyone know what can cause the following error?
[3:19:15 pm] ERROR Error while importing module MODULE_HERE: Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/runner/work/MODULE_HERE/node_modules/jiti/lib/jiti.mjs' imported from /Users/frederikprijck/Development/playground/my-nuxt-app/node_modules/jiti/lib/jiti.mjs
at loadNuxtModuleInstance (node_modules/@nuxt/kit/dist/index.mjs:720:15)
at async installModules (node_modules/@nuxt/kit/dist/index.mjs:561:17)
at async initNuxt (node_modules/nuxt/dist/index.mjs:5856:3)
at async loadNuxt (node_modules/nuxt/dist/index.mjs:6073:5)
at async loadNuxt (node_modules/@nuxt/kit/dist/index.mjs:947:16)
at async Object.run (node_modules/@nuxt/cli/dist/chunks/prepare.mjs:32:18)
at async runCommand (node_modules/citty/dist/index.mjs:316:16)
at async runCommand (node_modules/citty/dist/index.mjs:307:11)
at async runMain (node_modules/citty/dist/index.mjs:445:7)
I am getting this after doing:
npx nuxi@latest init my-nuxt-app
cd my-nuxt-app
npm i MODULE_HERE
Then I include the module in the nuxt config and run npm run dev.
For what it's worth, the file does exist in my node_modules:
ls /Users/frederikprijck/Development/playground/my-nuxt-app/node_modules/jiti/lib
jiti-cli.mjs jiti-hooks.mjs jiti-native.mjs jiti-register.d.mts jiti-register.mjs jiti.cjs jiti.d.cts jiti.d.mts jiti.mjs types.d.ts
Disclaimer: the module is my own, and new, available on npm. So it may just be an issue in the module.