dmmulroy / create-melange-app

The fastest, friendliest, and most delightful way to get started with OCaml, ReasonML, and Melange, geared towards JavaScript and TypeScript developers
120 stars 20 forks source link

Bun create melange-app in debian #73

Closed JoaoAlexNunes closed 8 months ago

JoaoAlexNunes commented 10 months ago

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

rondDev commented 10 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
dmmulroy commented 10 months ago

Is it only with bun?

JoaoAlexNunes commented 10 months ago

Yes, pnpm and npm works perfectly

dmmulroy commented 10 months ago

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

JoaoAlexNunes commented 10 months ago

I will then

JoaoAlexNunes commented 9 months ago

No feedback was provided in the bun community, so this error still happens today

dmmulroy commented 9 months ago

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

JoaoAlexNunes commented 9 months ago

I can look into that then maybe it would be easier

dmmulroy commented 8 months ago

Cool yeah, I'd appreciate that!

JoaoAlexNunes commented 8 months ago

image

image

image