Describe the bug
Reporting on behalf of a student in a course I teach. I am unable to reproduce this myself, as my system is linux-x86-64.
Example error:
FAIL src/Tests/auth.test.ts
● Test suite failed to run
dlopen(/Users/someone/project-backend/node_modules/node-libcurl/lib/binding/node_libcurl.node, 0x0001): tried: '/Users/someone/project-backend/node_modules/node-libcurl/lib/binding/node_libcurl.node' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h' or 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/someone/project-backend/node_modules/node-libcurl/lib/binding/node_libcurl.node' (no such file), '/Users/someone/project-backend/node_modules/node-libcurl/lib/binding/node_libcurl.node' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h' or 'x86_64'))
Attempted workarounds (none of these have helped):
rm -r node_modules && npm i
npm cache clean --force and above
rm package-lock.json and above
Node correctly detects the environment:
% node -p 'process.arch'
x64
As does uname:
% uname -a
Darwin Someones-Macbook-Air-3.local 23.6.0 Darwin Kernel Version 23.6.0: Mon Aug 11 21:19:08 PDT 2025; root:xnu-10063.141.1.706.13~1/RELEASE_X86_64 x86_64
The bindings are indeed for arm64 instead of x86-64:
% file node_modules/node-libcurl/lib/binding/node_libcurl.node
node_modules/node-libcurl/lib/binding/node_libcurl.node: Mach-O 64-bit bundle arm64
To Reproduce
npm i [package that uses node-libcurl]
- Run code that uses
node-libcurl
- Error
Version information:
% npm ls node-libcurl
project-backend@ /Users/nicholasaoun/project-backend
└─┬ sync-request-curl@4.0.0
└── node-libcurl@5.0.2
OS: MacOS 14.8
Node.js Version: 24
Node was installed using nvm (nvm install 24). I do not believe that the student made any configuration changes.
Additional context
Any additional troubleshooting steps would be appreciated.
Describe the bug
Reporting on behalf of a student in a course I teach. I am unable to reproduce this myself, as my system is
linux-x86-64.Example error:
Attempted workarounds (none of these have helped):
rm -r node_modules && npm inpm cache clean --forceand aboverm package-lock.jsonand aboveNode correctly detects the environment:
As does
uname:The bindings are indeed for arm64 instead of x86-64:
To Reproduce
npm i [package that uses node-libcurl]node-libcurlVersion information:
OS: MacOS 14.8
Node.js Version: 24
Node was installed using
nvm(nvm install 24). I do not believe that the student made any configuration changes.Additional context
Any additional troubleshooting steps would be appreciated.