question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm install error

See original GitHub issue

Hi, I’m new here and I’m not very familiar with Node.js or JS. I installed node.js latest version and downloaded this project. then in vs code terminal I entered npm install but this error came up. I don’t know how to fix this. can anybody help. Thank you very much Screenshot 2021-12-30 at 9 27 11 PM

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:18

github_iconTop GitHub Comments

4reactions
ezdouglascommented, Jan 28, 2022

The issue is that you are using wrong version of node.

TO EVERYONE FACING A PROBLEM WITH NPM INSTALL NPM RUN GENERATE

I HAVE FOUND A FIX for MAC USERS M1!

1- Open terminal and type: nvm --version if you don’t have nvm then you must install it with: curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash

it is vital that you RESTART TERMINAL after this step.

2- Open terminal again and run: 

nvm install v16.13.0

3- re-download the source code from this github and open it in Visual Studio Code, do not open the past folder you had because most likely you have the modules installed already, just redownload and open a new folder.

4- in Visual Studio Code, press New Terminal

5- Run this code: nvm use v16.13.0

then If you don’t have homebrew installed then install it with this command: (it can take 15 mins to install homebrew). 
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 
and then you must install the packages by running: 
eval $(/opt/homebrew/bin/brew shellenv)brew install pkg-config cairo pango libpng jpeg giflib librsvg

if you have the packages already installed then use: eval $(/opt/homebrew/bin/brew shellenv) brew reinstall pkg-config cairo pango libpng jpeg giflib librsvg

now Run: brew install yarn then yarn install then npm i then npm run generate

Everything should work now! If you have any error still, I am happy to help! It took me 5 hours to figure it out but I finally did.

1reaction
ezdouglascommented, Jan 28, 2022

@loganjat it’s brew install yarn My bad!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common errors | npm Docs
Possible temporary npm registry glitch, or corrupted local server cache. Run npm cache clean and/or try again later. · This can be caused...
Read more >
npm install error from the terminal - Stack Overflow
Running just "npm install" will look for dependencies listed in your package.json. The error you're getting says that you don't have a ...
Read more >
NPM install error - Material Design for Bootstrap
Trying to install MDB pro 4.19.2 just downloaded and ran npm install but getting this error of sha512 not matching. Can someone tell...
Read more >
How to solve npm ERR! code 1 when running npm install
Fix npm error code 1 by updating your dependencies · Update one package version in package.json file · Then run npm install ·...
Read more >
Step by step solution for npm install error - M220JS - MongoDB
Delete the package-lock. · If you see a lot of warning & error messages related to npm-gyp, run npm rebuild & this should...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found