node-getopt icon indicating copy to clipboard operation
node-getopt copied to clipboard

Bad value in package.json

Open tuxpoldo opened this issue 4 years ago • 1 comments

There is a bad value in the package.json file that causes the application to print an error message at every start:

(node:8) [DEP0128] DeprecationWarning: Invalid 'main' field in '/usr/local/lib/node_modules/@alo5/availability/node_modules/node-getopt/package.json' of './lib'. Please either fix that or report it to the module author
--
(Use `node --trace-deprecation ...` to show where the warning was created)

When used in a docker container, this error message is not printed on STDERR but redirected to STDOUT causing side effect when it is desired to redirect semantically relevant output to a file.

tuxpoldo avatar Jul 27 '21 14:07 tuxpoldo

This PR fixes the issue for me. It's not been merged into jiangmiao/node-getopt at this point.

For any future searchers that arrive here before this PR is merged, if you want to avoid the warnings, you can replace the line that looks like this in your package.json:

  "node-getopt" : "0.3.2",

with this :

  "node-getopt": "git://github.com/tuxpoldo/node-getopt.git#05e498731c14b648fa332ca78d3a301c5e4be440",

That lone string refers to the commit in tuxpoldo's repo that fixes the warning.

DinoChiesa avatar Mar 30 '22 22:03 DinoChiesa