You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adapterjs is a dependency of package mypackage and you attempt to view the dependencies of mypackage, none of the transitive dependencies installed by adapterjs show up in the dependency tree given by npm ls with respect to mypackage.
To demonstrate
Create new package: $ mkdir mypackage && cd mypackage && npm init -y
Install adapterjs as dependency: $ npm i -S adapterjs
List all dependencies installed for mypackage: $ npm ls
Notice how a lot more than just adapterjs was installed, but npm was unable to pick up on these dependencies because they were not listed as dependencies of adapterjs. It happens because adapterjs's package.json has a postinstall script that installs a submodule, webrtc-adapter.
This is problematic for a number of reasons. My particular problem comes from the setup of a private npm registry where I'm publishing all of my project's dependencies on a Nexus server semi-manually. I use npm ls to list all my dependencies and use that list to manually publish each listed version of each package individually. If they aren't listed with npm ls then they don't get published and cannot be installed by other packages later. This means adapterjs can't be installed using exclusively my private registry unless I npm ls from webrtc-adapter and also publish each of those dependencies.
Some other problems that I believe are also caused by this:
To solve this I believe it would be best to remove the postinstall script so nothing additional gets installed and because the distributables are already included when I npm i adapterjs. Not sure what the best practice alternative would be, but maybe putting it in a dev script and adding 1 more step to dev setup would be good enough.
The text was updated successfully, but these errors were encountered:
When
adapterjs
is a dependency of packagemypackage
and you attempt to view the dependencies ofmypackage
, none of the transitive dependencies installed byadapterjs
show up in the dependency tree given bynpm ls
with respect tomypackage
.To demonstrate
$ mkdir mypackage && cd mypackage && npm init -y
adapterjs
as dependency:$ npm i -S adapterjs
mypackage
:$ npm ls
adapterjs
:$ cd node_modules/adapterjs/third_party/adapter/ && npm ls
Notice how a lot more than just
adapterjs
was installed, but npm was unable to pick up on these dependencies because they were not listed as dependencies ofadapterjs
. It happens becauseadapterjs
'spackage.json
has apostinstall
script that installs a submodule,webrtc-adapter
.This is problematic for a number of reasons. My particular problem comes from the setup of a private npm registry where I'm publishing all of my project's dependencies on a Nexus server semi-manually. I use
npm ls
to list all my dependencies and use that list to manually publish each listed version of each package individually. If they aren't listed withnpm ls
then they don't get published and cannot be installed by other packages later. This meansadapterjs
can't be installed using exclusively my private registry unless Inpm ls
fromwebrtc-adapter
and also publish each of those dependencies.Some other problems that I believe are also caused by this:
To solve this I believe it would be best to remove the
postinstall
script so nothing additional gets installed and because the distributables are already included when Inpm i adapterjs
. Not sure what the best practice alternative would be, but maybe putting it in adev
script and adding 1 more step to dev setup would be good enough.The text was updated successfully, but these errors were encountered: