Bug ID 985350
Summary NodeJS non-standard module search paths
Classification openSUSE
Product openSUSE Tumbleweed
Version Current
Hardware Other
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Development
Assignee bnc-team-screening@forge.provo.novell.com
Reporter amajer@suse.de
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

From https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs
comments,

qantas94heavy wrote about 22 hours ago

With the change in https://build.opensuse.org/request/show/401914, does this
now mean that modules installed would now resolve to something when require()'d
when they did not before? Also this removes a folder which is documented to be
checked (mainly for historic reasons), would this have any effect on users?
https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders

---------------------------------------------

Marguerite Su MargueriteSu wrote about 18 hours ago

Did any trouble occur with this change? historically, openSUSE never used
%{_libdir}/node for any purpose (we started providing nodejs from 12.2). no
module was installed into that directory, no rpm macro was defined to be that
directory.

so, unleass upstream decide to use that directory again, in packaging, I think
this change is consistent, it is just a fix for that our nodejs kept checking a
non-used directory.

---------------------------------------------

Karl Cheng qantas94heavy wrote about 7 hours ago

With the change, if you do something like the following:

npm install -g jshint

node

> require('jshint')

Then it'll load the module, which is inconsistent with default Node.js
behaviour and other distributions:
https://docs.npmjs.com/getting-started/installing-npm-packages-globally

---------------------------------------------

Marguerite Su MargueriteSu wrote about 6 hours ago

please file a bugreport. still didn't get your concern. will discuss it there.


You are receiving this mail because: