![]() ![]() 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. 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. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |