Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while building for windows. #3257

Closed
pratishshr opened this issue Aug 19, 2018 · 3 comments
Closed

Error while building for windows. #3257

pratishshr opened this issue Aug 19, 2018 · 3 comments

Comments

@pratishshr
Copy link

  • Version: 20.28.1

  • electron-updater: 3.1.1

  • Target: Windows

Can't seem to find the issue while building for windows.

2018-08-19T06:40:57.7193022Z   ΓÇó electron-builder version=20.28.1
2018-08-19T06:40:57.7942824Z   ΓÇó loaded configuration file=package.json ("build" field)
2018-08-19T06:40:57.8069761Z   ΓÇó description is missed in the package.json appPackageFile=D:\a\1\s\package.json
2018-08-19T06:40:57.8112748Z   ΓÇó electron-rebuild not required if you use electron-builder, please consider to remove excess dependency from devDependencies
2018-08-19T06:40:57.8114469Z 
2018-08-19T06:40:57.8119715Z To ensure your native dependencies are always matched electron version, simply add script `"postinstall": "electron-builder install-app-deps" to your `package.json`
2018-08-19T06:41:05.1152565Z   ΓÇó Unresolved node modules: typescript
2018-08-19T06:41:07.4632264Z   ΓÇó rebuilding native production dependencies platform=win32 arch=x64
2018-08-19T06:41:07.4674471Z   ΓÇó rebuilding native dependency name=sqlite3
2018-08-19T06:41:09.5675131Z ##[error]Error: C:\hostedtoolcache\windows\node\8.9.1\x64\node.exe exited with code 1
Output:
$ node-pre-gyp install --fallback-to-build
Failed to execute 'C:\hostedtoolcache\windows\node\8.9.1\x64\node.exe D:\a\1\s\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=D:\a\1\s\node_modules\sqlite3\lib\binding\electron-v1.8-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=D:\a\1\s\node_modules\sqlite3\lib\binding\electron-v1.8-win32-x64' (1)
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Error output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.6.39
node-pre-gyp info using node@8.9.1 | win32 | x64
node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/electron-v1.8-win32-x64.tar.gz
node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/electron-v1.8-win32-x64.tar.gz
node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/electron-v1.8-win32-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.13 and electron@1.8.7 (electron-v1.8 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/electron-v1.8-win32-x64.tar.gz 
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@8.9.1 | win32 | x64
gyp info ok 
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@8.9.1 | win32 | x64
gyp ERR! configure error 
gyp ERR! stack Error: Command failed: C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack 
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:275:12)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:346:11)
gyp ERR! stack     at emitOne (events.js:116:13)
gyp ERR! stack     at Socket.emit (events.js:211:7)
gyp ERR! stack     at Pipe._handle.close [as _onclose] (net.js:554:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\hostedtoolcache\\windows\\node\\8.9.1\\x64\\node.exe" "D:\\a\\1\\s\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=D:\\a\\1\\s\\node_modules\\sqlite3\\lib\\binding\\electron-v1.8-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=D:\\a\\1\\s\\node_modules\\sqlite3\\lib\\binding\\electron-v1.8-win32-x64"
gyp ERR! cwd D:\a\1\s\node_modules\sqlite3
gyp ERR! node -v v8.9.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute 'C:\hostedtoolcache\windows\node\8.9.1\x64\node.exe D:\a\1\s\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=D:\a\1\s\node_modules\sqlite3\lib\binding\electron-v1.8-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=D:\a\1\s\node_modules\sqlite3\lib\binding\electron-v1.8-win32-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (D:\a\1\s\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Windows_NT 10.0.14393
node-pre-gyp ERR! command "C:\\hostedtoolcache\\windows\\node\\8.9.1\\x64\\node.exe" "D:\\a\\1\\s\\node_modules\\node-pre-gyp\\bin\\node-pr
2018-08-19T06:41:09.5745399Z ##[error]e-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd D:\a\1\s\node_modules\sqlite3
node-pre-gyp ERR! node -v v8.9.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok 
error Command failed with exit code 1.

    at ChildProcess.childProcess.once.code (D:\a\1\s\node_modules\builder-util\src\util.ts:254:14)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
From previous event:
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
    at D:\a\1\s\node_modules\app-builder-lib\src\util\yarn.ts:157:27
From previous event:
    at rebuild (D:\a\1\s\node_modules\app-builder-lib\out\util\yarn.js:239:18)
    at D:\a\1\s\node_modules\app-builder-lib\src\util\yarn.ts:20:11
    at Generator.next (<anonymous>)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
    at installOrRebuild (D:\a\1\s\node_modules\app-builder-lib\out\util\yarn.js:68:17)
    at D:\a\1\s\node_modules\app-builder-lib\src\packager.ts:457:13
    at Generator.next (<anonymous>)
From previous event:
    at Packager.installAppDependencies (D:\a\1\s\node_modules\app-builder-lib\src\packager.ts:418:70)
    at D:\a\1\s\node_modules\app-builder-lib\src\packager.ts:368:20
    at Generator.next (<anonymous>)
From previous event:
    at Packager.doBuild (D:\a\1\s\node_modules\app-builder-lib\src\packager.ts:344:39)
    at D:\a\1\s\node_modules\app-builder-lib\src\packager.ts:314:57
From previous event:
    at Packager._build (D:\a\1\s\node_modules\app-builder-lib\src\packager.ts:285:133)
    at D:\a\1\s\node_modules\app-builder-lib\src\packager.ts:281:23
    at Generator.next (<anonymous>)
From previous event:
    at Packager.build (D:\a\1\s\node_modules\app-builder-lib\src\packager.ts:238:14)
    at build (D:\a\1\s\node_modules\app-builder-lib\src\index.ts:58:28)
    at build (D:\a\1\s\node_modules\electron-builder\src\builder.ts:227:10)
    at then (D:\a\1\s\node_modules\electron-builder\src\cli\cli.ts:42:48)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
    at Object.args [as handler] (D:\a\1\s\node_modules\electron-builder\src\cli\cli.ts:42:48)
    at Object.runCommand (D:\a\1\s\node_modules\electron-builder\node_modules\yargs\lib\command.js:237:44)
    at Object.parseArgs [as _parseArgs] (D:\a\1\s\node_modules\electron-builder\node_modules\yargs\yargs.js:1085:24)
    at Object.get [as argv] (D:\a\1\s\node_modules\electron-builder\node_modules\yargs\yargs.js:1000:21)
    at Object.<anonymous> (D:\a\1\s\node_modules\electron-builder\src\cli\cli.ts:25:28)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

2018-08-19T06:41:09.5917713Z ##[error]error Command failed with exit code 1.

2018-08-19T06:41:09.5920224Z info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
2018-08-19T06:41:09.6200526Z ##[section]Finishing: Powershell: Custom commands

@taojy123
Copy link

I meet the same problem too!

@taojy123
Copy link

I resolve this problem by delete the file in:
C:\Users\XXX\AppData\Local\electron\Cache
such as electron-v2.0.9-win32-x64.zip...

@develar
Copy link
Member

develar commented Nov 8, 2018

Some weird Windows error...

@develar develar closed this as completed Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants