Closed JoaoAlexNunes closed 8 months ago
Can replicate:
Linux 5.15.0-89-generic Ubuntu x86_64 GNU/Linux
rond@caprover:~$ bun create melange-app
node:internal/errors:497
ErrorCaptureStackTrace(err);
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'melange.js' imported from /tmp/create-melange-app@latest--bunx/node_modules/create-melange-app/build/src/init/component.mjs
at new NodeError (node:internal/errors:406:5)
at packageResolve (node:internal/modules/esm/resolve:789:9)
at moduleResolve (node:internal/modules/esm/resolve:838:20)
at defaultResolve (node:internal/modules/esm/resolve:1043:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:228:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
Node.js v20.8.1
Is it only with bun?
Yes, pnpm and npm works perfectly
Any shot you could ask around in the bun discord? You can point them to: https://www.npmjs.com/package/create-melange-app?activeTab=code
I will then
No feedback was provided in the bun community, so this error still happens today
I think our solution is going to be involve bundling our distribution thats invoked from bin/
in pkg json. This is what create-t3-app does
I can look into that then maybe it would be easier
Cool yeah, I'd appreciate that!
bun create melange-app node:internal/modules/esm/resolve:844 throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null); ^
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'melange.js' imported from /tmp/create-melange-app@latest--bunx/node_modules/create-melange-app/build/src/init/component.mjs at packageResolve (node:internal/modules/esm/resolve:844:9) at moduleResolve (node:internal/modules/esm/resolve:901:20) at defaultResolve (node:internal/modules/esm/resolve:1121:11) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12) at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25) at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38) at ModuleWrap. (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
Node.js v21.5.0