0

I tried to install web3 in my mac by using sudo npm install web3 but failed many a times . Please help me to sort this matter out . i am attaching you the exact error that I am facing while running above command.enter image description here

0

This is a Node question more so.

But most likely your issues lies here:

no such file or directory, open '/Users/saitejakuruva/package.json'

You're not in a proper project directly when calling npm install. NPM was trying to write to, or update, the package.json file.

Try npm install -g web3 which will install web3 at a global level available to all projects.

This may go against best practices elsewhere per project, so be aware.

Update:

Link to fixing permission issues with Mac and NPM: https://stackoverflow.com/questions/47252451/permission-denied-when-installing-npm-modules-in-osx/47252840

6
  • So sorry. I tried using the command suggested by you but I facing the same issue. Please find the details of the issue here i.imgur.com/PZgZkDH.png – Saiteja Kuruva Mar 19 '19 at 19:18
  • Well, it's a small step in the right direction. No longer is the package.json error showing. But it's still an access permissions error when creating new directories. Please read this post: stackoverflow.com/questions/47252451/… Does that help? – Matt Swezey Mar 19 '19 at 19:23
  • It doesn't work for me again getting the same error. :( – Saiteja Kuruva Mar 19 '19 at 19:58
  • how about yarn global add web3 ? – Matt Swezey Mar 19 '19 at 20:43
  • What is this? I'm unable to understand this can you please explain me in detail please – Saiteja Kuruva Mar 19 '19 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.