swc报错的代码 case 'darwin': switch (arch) { case 'x64': localFileExisted = existsSync(join(__dirname, 'swc.darwin-x64.node')); try { if (localFileExisted) { nativeBinding = require('./swc.darwin-x64.node'); } else { nativeBinding = require('@swc/core-darwin-x64'); // 报...
我们最后得到的结果就是require进来一个二进制文件。 这个文件的路径大概是这样的:/Users/xx/swc-demo/node_modules/@swc/core-darwin-x64/swc.darwin-x64.node,当然这会根据不同电脑生成不同的路径~ 来看一下,swc的包里这个文件: 为了证实它是一个二进制文件,我们可以点开看一下(这里是用了vscode的插件,才...
41.7 MB 2025-03-04T17:04:06Z swc.darwin-arm64.node 32.9 MB 2025-03-04T17:03:18Z swc.darwin-x64.node 34.9 MB 2025-03-04T17:02:20Z swc.linux-arm-gnueabihf.node 23.7 MB 2025-03-04T17:03:10Z swc.linux-arm64-gnu.node 39.4 MB 2025-03-04T17:03:29Z swc.linux-...
Super-fast alternative for babel. Latest version: 1.11.13, last published: 2 days ago. Start using @swc/core-darwin-arm64 in your project by running `npm i @swc/core-darwin-arm64`. There are 4 other projects in the npm registry using @swc/core-darwin-arm
[ArchName]; // 遍历信息 for (const triple of triples) { if (packageName) { try { // 获取到需要加载的二进制文件路径// /Users/xx/swc-demo/node_modules/@swc/core-darwin-x64/swc.darwin-x64.node return require( require.resolve( `${packageName}-${triple.platformArchABI}`, { paths: ...
I've found a fix, apparently what happens (not sure why) is node_modules/@swc/core installs wrong optional packages within docker container. Heres the fix: Open docker image and find your WORKDIR Remove core-darwin-x64 or core-win-32-x64-msvc or similar from node_modules/@swc/core. ...
2 changes: 1 addition & 1 deletion 2 packages/core/scripts/npm/darwin-x64/package.json Original file line numberDiff line numberDiff line change @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", "version": "1.10.1-nightly-20241209.1", "version": "1.10.1", "os": [ "darw...
@Brooooooklynsorry, I should've clarified. I'm running in Dockerswc...darwin-x64.nodeexisted (both host / container). The error inside of the Docker container was like the OPTypeError: Can not find node binding files from @swc/core-linux-x64-gnu, @swc/core-linux-x64-gnux32, @swc...
"@swc/core-darwin-x64@npm:1.10.15": version: 1.10.15 resolution: "@swc/core-darwin-x64@npm:1.10.15" conditions: os=darwin & cpu=x64 languageName: node linkType: hard "@swc/core-linux-arm-gnueabihf@npm:1.10.14": version: 1.10.14 resolution: "@swc/core-linux-arm-gnueabihf@npm:1.1...
4531 - "@swc/core-darwin-arm64@1.7.0": 4532 - version "1.7.0" 4533 - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.0.tgz#fdc694dd6e8543f3efea0619a6fba9ce82939205" 4534 - integrity sha512-2ylhM7f0HwUwLrFYZAe/dse8PCbPsYcJS3Dt7Q8...