iotaledger / trinity-wallet

Trinity is IOTA's old, deprecated wallet. Use Firefly instead.
https://trinity.iota.org
Other
470 stars 120 forks source link

Failed at the trinity-wallet@0.0.0 deps:desktop script #2864

Open ryanfalzon opened 4 years ago

ryanfalzon commented 4 years ago

Bug description

Followed the steps that are on this page: https://docs.iota.org/docs/wallets/0.1/trinity/how-to-guides/develop-features-on-trinity. When trying to run the command npm run deps:desktop, an error is given in the console.

Version

Node Version: v10.16.3 Yarn Version: 1.22.4 Git Version: 2.17.1.windows.2

Hardware specification

What hardware are you using?

Steps To reproduce the bug

Explain how the maintainer can reproduce the bug.

  1. Install Node.js, Yarn, and Git using the above versions
  2. git clone https://github.com/iotaledger/trinity-wallet.git
  3. cd trinity-wallet
  4. yarn deps:shared
  5. npm install --global windows-build-tools
  6. git clone https://github.com/Microsoft/vcpkg C:\src\vcpkg
  7. cd C:\src\vcpkg
  8. .\bootstrap-vcpkg.bat
  9. .\vcpkg install openssl:x64-windows-static 10 npm run deps:desktop

Expected behaviour

All desktop dependencies should be installed successfully.

Actual behaviour

An error is given in the console.

Errors

0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'deps:desktop' ] 2 info using npm@6.9.0 3 info using node@v10.16.3 4 verbose run-script [ 'predeps:desktop', 'deps:desktop', 'postdeps:desktop' ] 5 info lifecycle trinity-wallet@0.0.0~predeps:desktop: trinity-wallet@0.0.0 6 info lifecycle trinity-wallet@0.0.0~deps:desktop: trinity-wallet@0.0.0 7 verbose lifecycle trinity-wallet@0.0.0~deps:desktop: unsafe-perm in lifecycle true 8 verbose lifecycle trinity-wallet@0.0.0~deps:desktop: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\music\Documents\trinity-wallet\node_modules.bin;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter;;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\ProgramData\chocolatey\bin;;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\nodejs\;C:\Program Files (x86)\Yarn\bin\;C:\Users\music\AppData\Local\Programs\Python\Python38-32\Scripts\;C:\Users\music\AppData\Local\Programs\Python\Python38-32\;C:\Users\music.windows-build-tools\python27\;C:\Users\music\AppData\Local\Microsoft\WindowsApps;C:\Users\music\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\;C:\Users\music.jdks\openjdk-14.0.1\bin;C:\Users\music\AppData\Roaming\cabal\bin;C:\ProgramData\chocolatey\lib\ghc\tools\ghc-8.10.1\bin;C:\Users\music\AppData\Roaming\npm;C:\Users\music\AppData\Local\Yarn\bin 9 verbose lifecycle trinity-wallet@0.0.0~deps:desktop: CWD: C:\Users\music\Documents\trinity-wallet 10 silly lifecycle trinity-wallet@0.0.0~deps:desktop: Args: [ '/d /s /c', 'cd src/desktop && npm install && cd ../..' ] 11 silly lifecycle trinity-wallet@0.0.0~deps:desktop: Returned: code: 1 signal: null 12 info lifecycle trinity-wallet@0.0.0~deps:desktop: Failed to exec deps:desktop script 13 verbose stack Error: trinity-wallet@0.0.0 deps:desktop: cd src/desktop && npm install && cd ../.. 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16) 13 verbose stack at EventEmitter.emit (events.js:198:13) 13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:198:13) 13 verbose stack at maybeClose (internal/child_process.js:982:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) 14 verbose pkgid trinity-wallet@0.0.0 15 verbose cwd C:\Users\music\Documents\trinity-wallet 16 verbose Windows_NT 10.0.18363 17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "deps:desktop" 18 verbose node v10.16.3 19 verbose npm v6.9.0 20 error code ELIFECYCLE 21 error errno 1 22 error trinity-wallet@0.0.0 deps:desktop: cd src/desktop && npm install && cd ../.. 22 error Exit status 1 23 error Failed at the trinity-wallet@0.0.0 deps:desktop script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

rajivshah3 commented 4 years ago

@ryanfalzon can you run cd src/desktop and then npm ci?

ryanfalzon commented 4 years ago

2020-06-15T19_29_33_907Z-debug.log 2020-06-15T19_29_33_979Z-debug.log

rajivshah3 commented 4 years ago

Thanks. Do you mind trying one more time? You can run $env:DEBUG="electron-builder" (I assume you're using PowerShell) before npm ci to get more verbose logging info. I think the issue is related to the argon2 library but it's hard to tell what's going wrong

ryanfalzon commented 4 years ago

2020-06-15T21_05_58_070Z-debug.log 2020-06-15T21_05_58_136Z-debug.log

ryanfalzon commented 4 years ago

It looks like it is not being able to retrieve builds from sources after it fails to get pre-builts.

ryanfalzon commented 4 years ago

I changed the argon2 dependency to point directly to the source as follows: "argon2": "ranisalt/node-argon2" Doing that gave a new error which can be found in the attached logs.

2020-06-15T21_11_24_135Z-debug.log

rajivshah3 commented 4 years ago

Sorry this is giving you so much trouble, I don't think I've seen these issues before. Can you try running $env:DEBUG="electron-builder" and then ./node_modules/.bin/electron-builder install-app-deps?

rajivshah3 commented 4 years ago

The OpenSSL lib built correctly, right? That's the step where you do .\vcpkg install openssl:x64-windows-static

ryanfalzon commented 4 years ago

Sorry this is giving you so much trouble, I don't think I've seen these issues before. Can you try running $env:DEBUG="electron-builder" and then ./node_modules/.bin/electron-builder install-app-deps?

2020-06-15T21_37_44_390Z-debug.log

The OpenSSL lib built correctly, right? That's the step where you do .\vcpkg install openssl:x64-windows-static

Yes did that part again and says package already installed so I guess everything is fine from that end.