3 ms·
Npm doesn't do environments. You have the choice of "in this directory" or "globally" and pray there are no symlinks involved or things fail mysteriously. It do
by viraptor 4y ago
Npm doesn't do environments. You have the choice of "in this directory" or "globally" and pray there are no symlinks involved or things fail mysteriously. It doesn't quite do packaging either.
So it lands in a similar space to what the parent describes - mostly a good dependency manager.
- coldtea 4y ago>Npm doesn't do environments. "This directory" (which can be overriden with env setting or similar advise for where to lookup) works fine for me, and never have been a problem in quite complex setups. Not sure why "symlinks" would be involved. In any case, what NPM does is leaps and bounds ahead of any shit Python offering we have to deal with, which is a constant source of trouble. IIRC, it's also the model ("this directory") that there's a PEP to imitatate, not sure what happened to that...
- wirrbel 4y agoBack in the days we had the .eggs directory in python it worked fairly well except for binary packages so we got virtual environments.
- coldtea 4y agoWhat was the problem with binary packages for .eggs? Because, iirc, npm does handle e.g. .so files in packages that are based on C/C++ code, and puts them and everything else in the same, relocatable even (another pain point with virtualenvs), .node_modules directory.
- viraptor 4y ago> which can be overriden with env setting Support for this is not great. Lots of packages still don't support this properly. My experience matches the 2015 comment https://github.com/npm/npm/issues/775#issuecomment-71294085 https://github.com/npm/npm/issues/775#issuecomment-71294085 > Not sure why "symlinks" would be involved. If you make your node_modules a symlink, multiple packages will fail. Even if you're not interested in doing that, others are. I tried the be symlinks because the env var option is not reliable. > What NPM does is leaps and bounds ahead Unless you change your node / gyp version. It doesn't really have a concept of runtime version. You can restrict it, but not have two concurrent versions if they conflict.