Friday, 19 June 2020

NPM package installation configuration?

Hi, I'm an intern at a non-tech corporate company asking me to do some web dev in react. Unfortunately, the tech stack at this org is not very mature, and so the internal package registry does not work very well. For whatever reason, a few of the packages that I need, such as typescript or any of its dependents/ dev dependencies, or webpack, only install globally. Our API times out otherwise. Frankly, it's kind of, like really really shit. They don't let us use public registries like the one hosted by github, we have to use the internal one. Github's registry is actually firewall'd off. I couldn't if I wanted to.I am trying to get my system set up such that when I run npm install it will grab the version from global automatically, instead of the version from online. I thought that this was how npm worked to begin with, but apparently not. The other way of handling this that I'd be chill with, is if the app I'm working on were able to see the global install folder as a part of the packages available to the local app. So for example, if the app needs typescript@3.9.5, it goes and sees that package exists globally, and therefore bypasses trying to pull down something like that locally.​Is this possible? Thanks.

Submitted June 19, 2020 at 10:28PM by 0x4A5753

No comments:

Post a Comment