swc-project / swc-project/swc-node

Error: Bindings not found on MacOS / NodeJS 20.16 for for ARM64 (M1/M2/M3 etc.) architecture

Open
#843 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2k
Forks
95
Avg merge
14d 11h
Merged PRs (30d)
1

Description

Hello, having a bit of a challenging out-of-the box experience here...

How to reproduce:

index.ts:

console.log(process.arch, process.version);

package.json:

{
	"name": "test-swc",
	"version": "1.0.0",
	"description": "",
	"scripts": {
		"start": "node -r @swc-node/register index.ts",
		"test": "echo \"Error: no test specified\" && exit 1"
	},
	"keywords": [],
	"author": "",
	"license": "ISC",
	"devDependencies": {
		"@swc-node/register": "^1.10.9",
		"@types/node": "^22.4.0"
	}
}

Node version:

$ node -e 'console.log(process.arch, process.version);'
arm64 v20.16.0

swc-node version: 1.10.9 (see package.json)

Steps to reproduce:

$ npm install
$ npm run start

Expectation: That it output something like arm64 v20.16.0

Reality:

$ npm run start

> test-swc@1.0.0 start
> node -r @swc-node/register index.ts

/Users/macuser/mm/test-swc/node_modules/@swc/core/index.js:255
        throw new Error("Bindings not found");
        ^

Error: Bindings not found
    at Compiler.transformSync (/Users/macuser/mm/test-swc/node_modules/@swc/core/index.js:255:15)
    at transformSync (/Users/macuser/mm/test-swc/node_modules/@swc/core/index.js:356:21)
    at transformSync (/Users/macuser/mm/test-swc/node_modules/@swc-node/core/index.ts:93:26)
    at compile (/Users/macuser/mm/test-swc/node_modules/@swc-node/register/register.ts:111:40)
    at /Users/macuser/mm/test-swc/node_modules/@swc-node/register/register.ts:122:38
    at Module._compile (/Users/macuser/mm/test-swc/node_modules/pirates/lib/index.js:113:29)
    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Object.newLoader [as .ts] (/Users/macuser/mm/test-swc/node_modules/pirates/lib/index.js:121:7)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1024:12)

Node.js v20.16.0


Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the reproduction from package.json with index.ts using Node.js 20.16.0 on an ARM64 Mac, then inspect the reported failure in node_modules/@swc/core/index.js and the @swc-node/register stack. Done means npm run start succeeds and prints the expected arm64 and Node.js version output.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, node.js, typescript
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.