Your message dated Sun, 16 Jan 2022 12:30:15 +0100
with message-id <[email protected]>
and subject line Re: node-yargs missing dependency on node-define-property
has caused the Debian Bug report #977233,
regarding node-yargs missing dependency on node-define-property
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
977233: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977233
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: node-babel7
Version: 7.12.9+~cs150.130.99-1
Severity: important

When trying to run mocha using babeljs-node command, it fails to find the modules installed in global nodejs directories.

pravi@mahishi:~/forge/js-team/node-window-size$ babeljs-node /usr/bin/mocha -R spec
internal/modules/cjs/loader.js:638
   throw err;
   ^

Error: Cannot find module 'v8flags'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
   at Function.Module._load (internal/modules/cjs/loader.js:562:25)
   at Module.require (internal/modules/cjs/loader.js:692:17)
   at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/usr/share/nodejs/@babel/node/lib/babel-node.js:3:39)
   at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
   at Module.load (internal/modules/cjs/loader.js:653:32)
   at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
   at Function.Module._load (internal/modules/cjs/loader.js:585:3)

Once I manually set the NODE_PATH variable, it starts working. We should probably set these paths before calling babeljs-node command.


pravi@mahishi:~/forge/js-team/node-window-size$ export NODE_PATH=/usr/lib/nodejs:debian/tests/test_modules:/usr/share/nodejs:/usr/lib/x86_64-linux-gnu/nodejs/:/usr/share/nodejs/mocha/node_modules pravi@mahishi:~/forge/js-team/node-window-size$ babeljs-node /usr/bin/mocha -R spec


 window-size
   ✓ should return an object with width and height
   ✓ should expose a `.get` method to get up-to-date size
   ✓ should get size from process.stdout
   ✓ should get size from process.stderr
   ✓ should get size from process.env
   ✓ should get size from tty
   ✓ should get size from tput
   utils
     ✓ should expose a `.get` method to get up-to-date size
     ✓ should get size from process.env
     ✓ should get size from tty
     ✓ should get size from tput


 11 passing (27ms)

pravi@mahishi:~/forge/js-team/node-window-size$

Some other things I found in this experiment,

1. node-environment-flags module which is required in /usr/share/nodejs/@babel/node/lib/babel-node.js is only available in /usr/share/nodejs/mocha/node_modules

Error: Cannot find module 'node-environment-flags'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
   at Function.Module._load (internal/modules/cjs/loader.js:562:25)
   at Module.require (internal/modules/cjs/loader.js:692:17)
   at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/usr/share/nodejs/@babel/node/lib/babel-node.js:7:52)
   at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
   at Module.load (internal/modules/cjs/loader.js:653:32)
   at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
   at Function.Module._load (internal/modules/cjs/loader.js:585:3)

2. Also node-yargs is missing a dependency on node-define-property.

/usr/share/nodejs/yargs/yargs.js:1242
     else throw err
          ^

Error: Cannot find module 'define-property'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
   at Function.Module._load (internal/modules/cjs/loader.js:562:25)
   at Module.require (internal/modules/cjs/loader.js:692:17)
   at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/home/pravi/forge/js-team/node-window-size/index.js:10:14)
--- End Message ---
--- Begin Message ---
Hi,

node-yargs never depends on define-property:

 $ npm i --package-lock-only --ignore-scripts
 $ grep define-property package-lock.json || echo Not found
 Not found

Tried also with previous versions

--- End Message ---
-- 
Pkg-javascript-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Reply via email to