Open pixellos opened 2 years ago
I guess you need target: "node"
in your spack.config.js
Added as You asked + RUST_BACKTRACE="full" as it panicked
thread '<unnamed>' panicked at 'rename_bundles called with non-path module', D:\a\swc\swc\crates\swc_bundler\src\bundler\finalize.rs:404:22
stack backtrace:
0: 0x7fff1ed9beda - rust_eh_personality
1: 0x7fff1e9e1e1a - <unknown>
2: 0x7fff1ed91cb8 - rust_eh_personality
3: 0x7fff1ed9d599 - rust_eh_personality
4: 0x7fff1ed9e569 - rust_eh_personality
5: 0x7fff1ed9dfb3 - rust_eh_personality
6: 0x7fff1ed9df49 - rust_eh_personality
7: 0x7fff1ed9df04 - rust_eh_personality
8: 0x7fff20929ce0 - wasmer_vm_f64_nearest
9: 0x7fff1e65ee90 - <unknown>
10: 0x7fff1e6311ff - <unknown>
11: 0x7fff1e5b77bd - <unknown>
12: 0x7ff67ddc311e - uv_queue_work
13: 0x7ff67ddaf36d - uv_poll_stop
14: 0x7ff67ebc0c60 - v8::internal::compiler::RepresentationChanger::Uint32OverflowOperatorFor
15: 0x7ffffa847c24 - BaseThreadInitThunk
16: 0x7ffffb94d721 - RtlUserThreadStart
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
[Error: panic detected] { code: 'GenericFailure' }
I think it can be related to this file
https://github.com/uuidjs/uuid/blob/main/src/native.js
Its trying to import node native crypto
, which is not package nor file.
any solution?
For me only thing that worked was overrides
section in package.json with older versions
Could you please tell me where did you override?
I m also facing the same issue
0: failed to analyze module 1: failed to resolve crypto from \***\node_modules\uuid\dist\esm-node\rng.js 2: not processed by tsc resolver because base module is in node_modules 3: Impossible to get the node_modules path] {
with webpack i had this
genericConfig.resolve.fallback = {
"crypto": require.resolve("crypto-browserify"),
"stream": require.resolve("stream-browserify")
};
how do i do this with swc?
Thanks
The pacakge.json
has overrides
section
"overrides": {
"@swc/core-android-arm64": "1.2.122",
"@swc/core-darwin-arm64": "1.2.122",
"@swc/core-darwin-x64": "1.2.122",
"@swc/core-freebsd-x64": "1.2.122",
"@swc/core-linux-arm-gnueabihf": "1.2.122",
"@swc/core-linux-arm64-gnu": "1.2.122",
"@swc/core-linux-arm64-musl": "1.2.122",
"@swc/core-linux-x64-gnu": "1.2.122",
"@swc/core-linux-x64-musl": "1.2.122",
"@swc/core-win32-arm64-msvc": "1.2.122",
"@swc/core-win32-ia32-msvc": "1.2.122",
"@swc/core-win32-x64-msvc": "1.2.122"
},
just put 1.2.121 instead, @last-Programmer
Describe the bug
Between "@swc/core-win32-x64-msvc" 1.2.121 and any version never than 1.2.122 there is a bug - any usage of
"uuid": "8.3.2"
library causes errorInput code
Config
Playground link
No response
Expected behavior
Compilation should succeed
Actual behavior
Version
1.2.135
Additional context
No response