How to install/download packages without using npm install <package_name> or yarn install

2.1k Views Asked by At

I work in a banking domain company so here many link and websites are blocked. Currently I am working on a project where I am using react and Node.js as tech stack. So whenever I want to install any new dependency or just npm install I get access problem. Is there any other solution to download the dependencies from package.json file apart from npm install

1

There are 1 best solutions below

0
Faizan Virani On

It'll be really tough not having yarn or npm do dependency management for you but there are options.

I highly recommend you set up a private npm registry just for your company. There are many paid and free services that can do this as well as open source self-hosted solutions. Once set up, all you have to do is edit your npm or yarn configurations and you're good to go. Here is a link with plenty of options to get this going. A few that come to mind of the top of my head are Artifactory and npm itself.

If none of these work for you, you can always just manually download npm packages from their Github repositories but this will be very tedious and time consuming (maybe you can write your custom package manager?) but I definitely don't recommend this route.