

Pass the GitHub repository as in place of the package name and NPM will do the work. Of course they need to be publicly available so NPM can clone the repository first and install the package from source. You can directly install packages from their GitHub repositories. Passing multiple packages will result in a sequence of package installation processes. npm install awaits an array of packages separated by space. NPM offers the ability to install multiple packages within one command. Install Multiple Packages With One Command Pass the package name as the third parameter and just wait for the installation to finish. You can install any package with the npm install command. That means, there is a high demand on installing packages :) And the number is drastically increasing. By the time of writing this article, more than 2 billion packages get downloaded monthly. The most common task with NPM is installing packages. This will be the playground if you want to run the commands showed within this post. Is that a problem? The repo was cloned into a folder called 'ClientName' and package.Create a Local Release Package Before Publishing to the Registryīefore we start installing any package, create a new node project with npm init. The only thing I can think of is the 'name' didn't match the enclosing folder. I cloned a repo directly from Github and ran npm install to install all the node_modules from the package.json file in the repo.įor some reason, I kept getting errors and I don't know why. it's not a great solution, but it's a hack that might work to get you going in a pinch if you can't track down the actual problem fast enough? ORIGINAL QUESTION (for posterity or myself later): I got the idea to delete package-lock.json from here, btw. It seemed better to me in this instance to bring the repo up to date instead of trying to maintain a little legacy time capsule and switch to an older Node every time I wanted to use it. If you need to keep the node-sass version the same, you can switch to using an earlier version of Node with NVM. It also kept node-sass at 4.11 which seems definitely wrong after learning how node-sass has native bindings attached to the current Node version since my Node is much newer than it was 2 years ago when I first created this repo, so I'm sure that node-sass needed to be updated, too. The fact that this was hacky and didn't always work perfectly made me keep looking for a better solution. Other times, I would need to install node-sass first and then npm install. NOTE: Simply deleting package-lock.json and running 'npm install' sometimes worked as well. When I did it this way, my node-sass was updated to the latest (4.14.1 instead of 4.11 as in the package.json file from the repo) and it works perfectly.


I am using a new computer with a newer version of Node (15). So do npm install node-sass, then npm install

This is because it uses native bindings attached to the current node version., and you see the term node-gyp mentioned in the error.
Npm install from github rep update#
From experience on Windows, it gives problems with new node versions, and you need to update the package when using a newer node version. I'm seeing node-sass in the list of dependencies. Thanks to /u/ferrybig for noticing the thread and giving me the reason it was breaking and the solution to fix it: I was able to get it working by just deleting the package-lock.json file and running npm install but I didn't like not knowing why this was working and I doubt it was a solution that would last very long, anyway, since it's a weird hack I don't even understand.I was getting error messages because I used uppercase letters in the name in package.json but that had nothing to do with why npm install wasn't working for me.Unless you're using node-sass and upgraded to a newer version of Node.
