octalmage / robotjs

Node.js Desktop Automation.
http://robotjs.io
MIT License
12.37k stars 959 forks source link

Error building Electron APP for windows #557

Open ramaralo opened 4 years ago

ramaralo commented 4 years ago

I'm trying to build an electron app for windows, but I get this error:

prebuild-install http 404 https://github.com/octalmage/robotjs/releases/download/v0.6.0/robotjs-v0.6.0-electron-v75-win32-x64.tar.gz

Project set up is:

When I run: npm run rebuild; npm run dist-mac it works fine. But when I run:

npm run rebuild; npm run dist-win I get:

electron-builder  version=21.2.0 os=18.6.0
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=dist/builder-effective-config.yaml
  • rebuilding native dependencies  dependencies=robotjs@0.6.0 platform=win32 arch=x64
  • install prebuilt binary  name=robotjs version=0.6.0 platform=win32 arch=x64
  ⨯ cannot build native dependency  reason=prebuild-install failed with error and build from sources not possible because platform or arch not compatible
                                    cause=exit status 1
                                    errorOut=prebuild-install info begin Prebuild-install version 5.3.3
    prebuild-install WARN install prebuilt binaries enforced with --force!
    prebuild-install WARN install prebuilt binaries may be out of date!
    prebuild-install info looking for cached prebuild @ /Users/xxxxxxxx/.npm/_prebuilds/d9fc94-robotjs-v0.6.0-electron-v75-win32-x64.tar.gz
    prebuild-install http request GET https://github.com/octalmage/robotjs/releases/download/v0.6.0/robotjs-v0.6.0-electron-v75-win32-x64.tar.gz
    prebuild-install http 404 https://github.com/octalmage/robotjs/releases/download/v0.6.0/robotjs-v0.6.0-electron-v75-win32-x64.tar.gz
    prebuild-install WARN install No prebuilt binaries found (target=7.1.2 runtime=electron arch=x64 libc= platform=win32)

                                    command=/Users/xxxxx/.nvm/versions/node/v12.0.0/bin/node /Users/xxxxxx/Projects/client-electron/node_modules/prebuild-install/bin.js --platform=win32 --arch=x64 --target=7.1.2 --runtime=electron --verbose --force
                                    workingDir=/Users/xxxxx/Projects/client-electron/node_modules/robotjs

Expected Behavior

I'm assuming I can build WIN dists on MAC, so I'd expect the exe files to be created. Anyway I see that, the 404 is from an inexisting URL:

https://github.com/octalmage/robotjs/releases/dowload

Context

Your Environment

abrantes01 commented 4 years ago

Did you find any solution @ramaralo ?

ramaralo commented 4 years ago

@abrantes01 No. For windows dist, I have to build on a windows machine. In that case to works.

psi-4ward commented 4 years ago

can you not use any CI Tool (like travis or appveyor) to build and deploy the windows stuff?