#npm & node-gyp error
24 messages Β· Page 1 of 1 (latest)
Iβm having trouble while running npm install on this project . Iβve tried everything
Are you trying to do this inside your one drive?
Perhaps that's the issue.
I had this happen to me about a week ago with a similar error from node-gyp rebuild. I tried several different things to get it to work:
Installed some .net tools from a stackoverflow answer.
Uninstalled and reinstalled node-gyp globally.
Installed some windows-build-tools plugin.
Used nvm to switch to lower versions of node.
And countless other things. I spent a good 2-3 hours trying to figure out the root of the cause. Nothing worked that I could find.
The reason the command was even running was from a package xml2json that I was trying to install. I had to isolate packages to see which one was causing it, because it was creating the error from a cloned repo when trying to initially install packages and narrowed it down to that. Ended up installing a different package that did the same thing and moved on.
I don't know if you are trying to install a package when this issue arises, but if you are, I would try to look for a package that does a similar thing.
You may be able to use this repo https://github.com/nodejs/node-gyp#npm-configuration-for-npm-versions-before-v9 for node-gyp and go through their README to see if anything from that might work for you as well.
thank you for this detailed insight! π
My pleasure! That error could be a number of things, something may work for it, but nothing worked for my specific situation π€·ββοΈ I chose the easy way out this time π
I personally would never work in a folder that syncs to the cloud π
That's why we have version control.
Yeah, that's a good point... kind of one of the reasons I installed wsl and have been working out of that ubuntu terminal. Though I can't be too sure something isn't synced still. It did come from the windows store after all π
Plus it's nice to have the man command. The git bash only does so much
wsl is great, it was a good idea to finally add it to windows. Although I am not using it at all, I have my work laptop from the company I am working for which is a mac π
my friend is using his PC (windows) with wsl and it's a pleasure to use
Hmmβ¦Desktop and Downloads are in OneDrive. The folder is on the desktop, I sometimes run stuffs from there.
Thanks a lot. This worked, I should have tried this sooner. It was better-sqlite3 package π. I removed it from the dependencies, installed the other dependencies and installed better-sqlite3 alone.
I donβt think it syncs to the cloud. You have to login or sign up and set somethingβs for that to happen but Iβll check again.
Yes, you need to login and setup auto sync but I think it is on by default. I just donβt think itβs a good idea to sync all of your node_modules π
I thought because it is a one drive folder, Microsoft might have setup special reading and writing access to it that is only available to the user and not for 3rd party services.
I am glad you managed to make it work! π nicely done
You're right, I wasn't really paying attention to it. I've moved everything from OneDrive now. It was there by default. I wouldn't want to sync everything on my Desktop and Downloads, I don't even have data for that. Thanks for letting me know π , You guys are amazing.
To be honest, I haven't been on a Mac computer since about '98 π so I genuinely wouldn't know what it was like in comparison! I do like the wsl though... I'm running out of memory on my pc unfortunately. In hindsight, I should have gotten one with way more memory π€·ββοΈ.
Glad you got it working! I tried to install mine alone too, it just didn't work in my case.
I've never had a mac before working 6-8 month at my current company hehe
We were working on Dell PC's with Ubuntu on it which is absolutely fine I really loved Ubuntu, everything was very easy going most of the time and it was fast.
Once we had to work from home we wanted to go for a longer holiday with my wife, 3 weeks in total which is waaaay to much for me, 2 weeks is the max I can handle without going mental π so I asked my employer if I could borrow a laptop from the office. The response was unexpected: We don't have any laptops available but we will get you one. The same day my manager gave me a call on Zoom, shared his screen and showed me a mac book if that would be good. I was like: wth? yes, of course wow thank you! π
I did not expect a mac at all but it made sense as I had to deal with mobile application development as well and you cannot develop anything for iOS unless you have a mac π
which is very annoying...
Yeah, I can go about a week and a half maybe 2 before I start getting stir crazy π€ͺ and feeling a need to be productive! 3 weeks is awesome to have lol but spread out a little though π
I actually started playing with flutter and dart a little bit for mobile app development. It's pretty neat. And they are starting to offer a backend for dart as well. While still a little ways out, it'd pretty neat to think about. But that was one snag I ran into was not being able to see what it looked like for ios. Only android would work because of windows. Also part of the reason I would consider getting a Mac for my next purchase (when I can afford it of course). I've just been so used to windows that it may be a small learning curve for me to use!
if you are using wsl you should be good to use mac.
The only annoying bit is when something is not supported on arm64 π
Sometimes you need to run brew in a different mode just to install something because the installation doesn't pick up the correct cpu version correctly π
I was speaking of getting used to some of the differences in keyboards and os (from a ui perspective). I'm not sure how different they in that regard. I've actually not had to use brew at all. But that's an interesting error though. I wonder if it has to do with brew or the specific package being installed π€