This repository was archived by the owner on Jan 13, 2024. It is now read-only.
This repository was archived by the owner on Jan 13, 2024. It is now read-only.
ES modules not supported #1291
Closed
Description
I'm getting the following error as soon as the compiled app boots:
node:internal/modules/cjs/loader:930
throw err;
^
Error: Cannot find module '/snapshot/dhjaks/index.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:927:15)
at Function._resolveFilename (pkg/prelude/bootstrap.js:1776:46)
at Function.Module._load (node:internal/modules/cjs/loader:772:27)
at Function.runMain (pkg/prelude/bootstrap.js:1804:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Here is a minimal reproducible example:
package.json
{ "type": "module" }
index.js
import os from 'os'
console.log(os.arch())
Build command:
pkg index.js