When trying to build the binaries, there is an attempt to download the file https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.7/fse-v1.2.7-electron-v4.0-darwin-x64.tar.gz . However, a 404 error is thrown since the file does not exist. I also tried to download it manually, but it seems like it does not exist at all.
This is the stacktrace:
• electron-builder version=20.38.5
• loaded configuration file=package.json ("build" field)
• rebuilding native production dependencies platform=darwin arch=x64
Error: /usr/local/bin/node exited with code 1
Output:
> [email protected] install /Users/USER/WebstormProjects/PROGRAM_NAME/node_modules/fsevents
> node install
SOLINK_MODULE(target) Release/.node
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
CXX(target) Release/obj.target/fse/fsevents.o
SOLINK_MODULE(target) Release/fse.node
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/USER/WebstormProjects/PROGRAM_NAME/node_modules/fsevents/lib/binding/Release/electron-v4.0-darwin-x64/fse.node --module_name=fse --module_path=/Users/USER/WebstormProjects/PROGRAM_NAME/node_modules/fsevents/lib/binding/Release/electron-v4.0-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
COPY /Users/USER/WebstormProjects/PROGRAM_NAME/node_modules/fsevents/lib/binding/Release/electron-v4.0-darwin-x64/fse.node
TOUCH Release/obj.target/action_after_build.stamp
Error output:
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.7/fse-v1.2.7-electron-v4.0-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (electron-v4.0 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (electron-v4.0 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error Connection closed while downloading tarball file
Same problem here
I opened up an issue on the fsevents repo about this as well as this might not necessarily pertain to electron-builder.
I just want to come back and tell you guys what worked for me.
I switched from npm to yarn and guess what? It magically started working again! So if you are using npm instead of yarn as your package manager, I would suggest making that switch.
@basicallysteve can you provide more details? I have problem with 404 even with yarn
Using yarn
did not help for me. However, it helped on both my development machine and in a VM to go back to node 8, with either nvm use 8
on my development machine, or nvm install 8
in the virtual machine, as that did not previously have it installed.
The most simplest way using npm I found 😄
npm i --save-dev [email protected]
I'm on macOS 10.14.15
running electron builder: 20.38.5
and stumbled upon this error when running electron-builder after updating node from 8 to 12.
Removing node_modules
and re-executing npm install
got everything up and running again 👍
I have tried all the above solutions and I am still getting this error. Any other ideas?
Same problem here on Mac 10.14.6, node 10.x, electron 6.0.3 and builder at 21.2.0.
UPD: simply removed the rebuild with the option npmRebuild: false
in package.json. All deps are already installed, so no need to re-download them. No node or package manager switches required.
@defusioner Even when I add npmRebuild: false
to package.json, electron-builder still executes the "rebuilding native dependencies" step
@dijs Sure that your config is something like this?
"build": {
"appId": "desktop",
"copyright": "Copyright © 2019 ${author}",
"npmRebuild": false,
It should stdout this line: skipped dependencies rebuild reason=npmRebuild is set to false
I had not put it in the build config!
Now it is working! Yay
Thanks
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Most helpful comment
The most simplest way using npm I found 😄