NPM installation fails with NASM and libcurl errors

Hey guys, I’m having trouble with NPM. I’ve tried everything I could think of. I even did a fresh install of NodeJS. But I keep getting these weird errors about NASM and libcurl.

Here’s what I’m seeing:

npm ERR! node-pre-gyp ERR! stack Error: Failed to execute node-gyp configure
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous>
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:518:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1104:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)

The full error log is pretty long, but it looks like it’s having issues with NASM and some Python stuff.

I’m using:

  • Python 3.13.1
  • NodeJS v20.18.3
  • Windows 11 64-bit

Any ideas what might be going wrong? I’m totally stuck!

Have you checked your Python installation? Sometimes NPM can be finicky about which Python version it uses. I’d recommend ensuring you have Python 2.7 installed alongside your 3.13.1, as some older npm packages still rely on it. Also, double-check your environment variables - make sure Python and Node paths are correctly set. Another thing to try is clearing your npm cache with ‘npm cache clean --force’ and then running ‘npm install’ again. If all else fails, you might want to consider using a tool like nvm (Node Version Manager) to manage different Node.js versions. It’s saved me countless headaches when dealing with package compatibility issues.

yo, i’ve run into this mess before. its usually cuz of some weird setup stuff. try checkin ur antivirus - sometimes it messes with npm. also, make sure u got the latest Visual C++ Redistributable installed. if nothin works, maybe try a different node version? npm can be a real pain sometimes lol

I have seen similar issues in the past and eventually discovered that they usually stem from misconfigurations with build tools or incompatible versions. In my experience, ensuring that the node-gyp package is updated globally and confirming that Windows build tools are properly installed helped resolve the problem. It is also important to verify that NASM is installed correctly and available in your system’s PATH. I found that installing the Windows SDK and Visual Studio Build Tools helped overcome the libcurl errors. Sometimes, using an earlier NodeJS version can improve compatibility, so checking your environment setup is crucial.