skygragon / leetcode-cli

A cli tool to enjoy leetcode!
MIT License
3.65k stars 459 forks source link

Error creating all-in-one binary #167

Closed ketankr9 closed 5 years ago

ketankr9 commented 5 years ago

How to reproduce

git clone https://github.com/skygragon/leetcode-cli.git
cd leetcode-cli/
npm i ansi-styles cheerio he mkdirp moment nconf ora prompt request supports-color underscore wordwrap yargs
sudo node ./bin/pkg

Error log

$$$ cat /home/ketankr9/.npm/_logs/2019-06-07T07_14_57_573Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'pkg',
1 verbose cli   '--',
1 verbose cli   'node9-linux-x64' ]
2 info using npm@5.5.1
3 info using node@v9.0.0
4 verbose run-script [ 'prepkg', 'pkg', 'postpkg' ]
5 info lifecycle leetcode-cli@2.6.1~prepkg: leetcode-cli@2.6.1
6 info lifecycle leetcode-cli@2.6.1~pkg: leetcode-cli@2.6.1
7 verbose lifecycle leetcode-cli@2.6.1~pkg: unsafe-perm in lifecycle true
8 verbose lifecycle leetcode-cli@2.6.1~pkg: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/home/ketankr9/leetcode-cli/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
9 verbose lifecycle leetcode-cli@2.6.1~pkg: CWD: /home/ketankr9/leetcode-cli
10 silly lifecycle leetcode-cli@2.6.1~pkg: Args: [ '-c', 'pkg . --out-path=dist/ --targets "node9-linux-x64"' ]
11 info lifecycle leetcode-cli@2.6.1~pkg: Failed to exec pkg script
12 verbose stack Error: leetcode-cli@2.6.1 pkg: `pkg . --out-path=dist/ --targets "node9-linux-x64"`
12 verbose stack spawn ENOENT
12 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack     at emitTwo (events.js:135:13)
12 verbose stack     at ChildProcess.emit (events.js:224:7)
12 verbose stack     at maybeClose (internal/child_process.js:943:16)
12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
13 verbose pkgid leetcode-cli@2.6.1
14 verbose cwd /home/ketankr9/leetcode-cli
15 verbose Linux 5.0.0-15-generic
16 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "pkg" "--" "node9-linux-x64"
17 verbose node v9.0.0
18 verbose npm  v5.5.1
19 error file sh
20 error code ELIFECYCLE
21 error errno ENOENT
22 error syscall spawn
23 error leetcode-cli@2.6.1 pkg: `pkg . --out-path=dist/ --targets "node9-linux-x64"`
23 error spawn ENOENT
24 error Failed at the leetcode-cli@2.6.1 pkg script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]
ketankr9 commented 5 years ago

Please update all-in-one binary, it's been 8 months since last release. I would have compiled it myself had I been successful in doing it.