You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.
My project uses ESM, but spack currently attempts to require('spack.config.js'). I can't use require with module: true, but I also cannot rename the config to spack.config.cjs or it won't be found since it's hardcoded to look for spack.config.js
The text was updated successfully, but these errors were encountered:
Same issue here. The code examples in the docs are shown to use ESM import syntax, so that's a bit contradicting. I'm going to opt with ncc in the meantime.
I also run into this issue every time I try out swc, which is a few times now. I can't figure out how to use spack in a project with "type": "module", so I always has to dismiss it as a viable option before I can even really try it.
> npx spack --config "/Users/lgarron/Code/git/github.com/cubing/cubing.js/spack.config.cjs"
thread '<unnamed>' panicked at 'cannot access a scoped thread local variable without calling `set` first', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-1.0.1/src/lib.rs:168:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^
[Error: panic detected] { code: 'GenericFailure' }
Node.js v19.7.0
For a lot of web development these days, it is quite feasible to work entirely with ESM code and no CommonJS. It would be really welcoming if that also applied to spack.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
My project uses ESM, but spack currently attempts to
require('spack.config.js')
. I can't userequire
withmodule: true
, but I also cannot rename the config tospack.config.cjs
or it won't be found since it's hardcoded to look forspack.config.js
The text was updated successfully, but these errors were encountered: