bufferutil: node-gyp failed to rebuild Xcode 13
I’m having a weird issue when adding bufferutil(4.0) to an electron project that runs electron-rebuild(3.2.3) throws this error where it’s trying to move a lipo file to a nonexistent directory. Not sure if it’s directly related to Xcode 13 or something else. Here are my laptop specs and error message.
MacOS BigSur npm version: 7.24.1 Node version: 14.17.5 Python version: 3.9.0
Building modules: 0/2 CC(target) Release/obj.target/bufferutil/src/bufferutil.o
CC(target) Release/obj.target/bufferutil/src/bufferutil.o
⠇ Building modules: 0/2 SOLINK_MODULE(target) Release/bufferutil.node
SOLINK_MODULE(target) Release/bufferutil.node
⠴ Building modules: 0/2error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't move temporary file: Release/bufferutil.node to file: Release/bufferutil.node.lipo (No such file or directory)
⠦ Building modules: 0/2make: *** [Release/bufferutil.node] Error 1
✖ Rebuild Failed
An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild '/Users/macbookpro/Documents/my-company/project/project-desktop/build/app/node_modules/utf-8-validate'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".
Error: make failed with exit code: 2
Error: node-gyp failed to rebuild '/Users/macbookpro/Documents/my-company/project/project-desktop/build/app/node_modules/utf-8-validate'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".
Error: make failed with exit code: 2
at NodeGyp.rebuildModule (/Users/macbookpro/Documents/my-company/project/project-desktop/node_modules/electron-rebuild/lib/src/module-type/node-gyp.js:109:19)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async ModuleRebuilder.rebuildNodeGypModule (/Users/macbookpro/Documents/my-company/project/project-desktop/node_modules/electron-rebuild/lib/src/module-rebuilder.js:94:9)
at async Rebuilder.rebuildModuleAt (/Users/macbookpro/Documents/my-company/project/project-desktop/node_modules/electron-rebuild/lib/src/rebuild.js:226:9)
at async Promise.all (index 123)
at async Rebuilder.rebuild (/Users/macbookpro/Documents/my-company/project/project-desktop/node_modules/electron-rebuild/lib/src/rebuild.js:180:13)
at async /Users/macbookpro/Documents/my-company/project/project-desktop/node_modules/electron-rebuild/lib/src/cli.js:154:9
child_process.js:836
throw err;
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 22 (11 by maintainers)
Commits related to this issue
- Downgrade websocket In order to fix mac build https://github.com/websockets/bufferutil/issues/136 — committed to parody/stomp-websocket by locatellidaniel a year ago
i’ve got a similar error in github action with nodejs 14 and node-gyp 5 and bufferutil 4.0.4. Works with 4.0.3
Yes, the
binding.gypchanges in https://github.com/websockets/bufferutil/commit/bedfb2c75a947e8486f353c016e16118f0cc2a8f are breaking. I missed it sorry.Anyway it shouldn’t be a big issue as a prebuilt binary is included in the package. Most people using this module won’t even notice.
Will try it tomorrow. Thanks
Luigi Pinca @.***> schrieb am Mo., 4. Okt. 2021, 20:53: