[Pkg-javascript-devel] Bug#898857: /usr/lib/nodejs/js-yaml/bin/js-yaml.js: /usr/bin/js-yaml should use /usr/bin/node and not node from env

Dominique Dumont dod at debian.org
Wed May 16 18:57:53 BST 2018


Package: node-js-yaml
Version: 3.11.0+dfsg-1
Severity: normal
File: /usr/lib/nodejs/js-yaml/bin/js-yaml.js

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?

I have both nodejs installed by Debian package and an older node installed
with a tarball (don't ask). The older node is preprended to PATH:

$ type node
node is /home/domi/bin/node

js-yaml is installed with Debian package. 

Heres the result:

$ js-yaml
module.js:549
    throw err;
    ^

Error: Cannot find module 'argparse'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/lib/nodejs/js-yaml/bin/js-yaml.js:14:16)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

When using Debian node, I have:
$ /usr/bin/node /usr/bin/js-yaml

The problem is:

$ head -1 /usr/bin/js-yaml
#!/usr/bin/env node


js-yaml should be patched to begin with '#!/usr/bin/node` to always
use node installed by Debian.

All the best


-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.16.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages node-js-yaml depends on:
ii  node-argparse  1.0.9-1
ii  node-esprima   4.0.0+ds-2
ii  nodejs         8.11.1~dfsg-2+b1

node-js-yaml recommends no packages.

node-js-yaml suggests no packages.

-- no debconf information



More information about the Pkg-javascript-devel mailing list