animetosho / ParPar

High performance PAR2 create client for NodeJS
190 stars 19 forks source link

Building v0.2.2 results in a binary with YError messages #11

Closed bgeet closed 6 years ago

bgeet commented 6 years ago

Trying to build parpar v0.2.2 at this point in time results in a binary that outputs YError messages. Possible some npm dependency issues.

Steps to reproduce git checkout tags/v0.2.2

npm i

./bin/parpar.js

YError: Invalid first argument. Expected boolean or string but received function. at argumentTypeError (/Users/test/src/ParPar/node_modules/yargs/lib/argsert.js:65:9) at parsed.optional.forEach (/Users/test/src/ParPar/node_modules/yargs/lib/argsert.js:47:39) at Array.forEach () at argsert (/Users/test/src/ParPar/node_modules/yargs/lib/argsert.js:42:21) at Object.version (/Users/test/src/ParPar/node_modules/yargs/yargs.js:757:5) at Object. (/Users/test/src/ParPar/bin/parpar.js:34:3) at Module._compile (module.js:649:30) at Object.Module._extensions..js (module.js:660:10) at Module.load (module.js:561:32) at tryModuleLoad (module.js:501:12) ParPar, a high performance PAR2 creation tool [...]

Possible culprits npm list

parpar@0.2.2 /Users/test/src/ParPar ├─┬ async@2.6.0 │ └── lodash@4.17.5 ├─┬ yargs@11.0.0 │ ├─┬ cliui@4.0.0 │ │ ├── string-width@2.1.1 deduped │ │ ├─┬ strip-ansi@4.0.0 │ │ │ └── ansi-regex@3.0.0 │ │ └─┬ wrap-ansi@2.1.0 │ │ ├─┬ string-width@1.0.2 │ │ │ ├── code-point-at@1.1.0 │ │ │ ├─┬ is-fullwidth-code-point@1.0.0 │ │ │ │ └── number-is-nan@1.0.1 │ │ │ └── strip-ansi@3.0.1 deduped │ │ └─┬ strip-ansi@3.0.1 │ │ └── ansi-regex@2.1.1 │ ├── decamelize@1.2.0 │ ├─┬ find-up@2.1.0 │ │ └─┬ locate-path@2.0.0 │ │ ├─┬ p-locate@2.0.0 │ │ │ └─┬ p-limit@1.2.0 │ │ │ └── p-try@1.0.0 │ │ └── path-exists@3.0.0 │ ├── get-caller-file@1.0.2 │ ├─┬ os-locale@2.1.0 │ │ ├─┬ execa@0.7.0 │ │ │ ├─┬ cross-spawn@5.1.0 │ │ │ │ ├─┬ lru-cache@4.1.2 │ │ │ │ │ ├── pseudomap@1.0.2 │ │ │ │ │ └── yallist@2.1.2 │ │ │ │ ├─┬ shebang-command@1.2.0 │ │ │ │ │ └── shebang-regex@1.0.0 │ │ │ │ └─┬ which@1.3.0 │ │ │ │ └── isexe@2.0.0 │ │ │ ├── get-stream@3.0.0 │ │ │ ├── is-stream@1.1.0 │ │ │ ├─┬ npm-run-path@2.0.2 │ │ │ │ └── path-key@2.0.1 │ │ │ ├── p-finally@1.0.0 │ │ │ ├── signal-exit@3.0.2 │ │ │ └── strip-eof@1.0.0 │ │ ├─┬ lcid@1.0.0 │ │ │ └── invert-kv@1.0.0 │ │ └─┬ mem@1.1.0 │ │ └── mimic-fn@1.2.0 │ ├── require-directory@2.1.1 │ ├── require-main-filename@1.0.1 │ ├── set-blocking@2.0.0 │ ├─┬ string-width@2.1.1 │ │ ├── is-fullwidth-code-point@2.0.0 │ │ └── strip-ansi@4.0.0 deduped │ ├── which-module@2.0.0 │ ├── y18n@3.2.1 │ └─┬ yargs-parser@9.0.2 │ └── camelcase@4.1.0 └── yencode@1.0.8

Workaround Use git HEAD, but you didn't recommend that in the past: https://www.reddit.com/r/usenet/comments/7bdymn/some_of_your_failing_downloads_might_be_due_to_a/dpipd9s/ So would prefer some fixed released version.

animetosho commented 6 years ago

Thanks for the report!

Can you try, in the directory ParPar is installed to, issue the command npm install yargs@4 ?
I think yargs has been updated and breaks ParPar's usage (which didn't specify a version to use). It shouldn't be an issue in future versions because the dependency has been removed.

bgeet commented 6 years ago

Much obliged for your fast answer.

npm install yargs@4 indeed silences the YError messages.

Please do a release that has this fixed or at least document it in README.md.

animetosho commented 6 years ago

Thanks for the confirmation.

Hopefully those having the same problems will find this issue. I'm hoping to get a new release out in the not too distant future.

animetosho commented 6 years ago

v0.3.0 released, which removes yargs dependency and resolves this issue.