Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

ErrorCorner

ErrorCorner Logo ErrorCorner Logo

ErrorCorner Navigation

  • Home
  • Contact Us
  • About Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Contact Us
  • About Us
Home/ Questions/Q 889
Answered
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 0
Kenil Vasani
Asked: December 19, 20202020-12-19T21:59:16+00:00 2020-12-19T21:59:16+00:00In: homebrew

env: node: No such file or directory in mac

  • 0

I’m searching it in google on how to show the version of node js or how I’m gonna work with npm?
If I do this

npm -v

even I already install it using brew install node. The result is always

env: node: No such file or directory

I already do a lot of command to solve for it, but failed.
these are the command that I already try:

sudo apt-get install nodejs-legacy
sudo ln -s /usr/local/bin/node /usr/bin/node
brew unlink node
brew link node

I can’t start the task because of this. help me guys. This work before after I used this command brew link --overwrite node. Now I have problem, i cant work anymore with npm. I’m really new about this. I don’t have any idea now on how to fix this.

Update

I already get the list using npm list command. I also get the idea here link but when I npm install inside the project. I alwayst get this “result env: node: No such file or directory”,even I command npm -v but If i command it outside my project. It work the npm -v

homebrewnode.js
  • 1 1 Answer
  • 16 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    1 Answer

    • Voted
    1. Kenil Vasani

      Kenil Vasani

      • 646 Questions
      • 567 Answers
      • 77 Best Answers
      • 26 Points
      View Profile
      Best Answer
      Kenil Vasani
      2020-12-19T21:55:51+00:00Added an answer on December 19, 2020 at 9:55 pm

      NOTE: Only mac users!

      1. uninstall node completely with the commands
      curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
      chmod +x ./uninstall-node.sh
      ./uninstall-node.sh
      rm uninstall-node.sh
      

      Or you could check out this website: How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)

      if this doesn’t work, you need to remove node via control panel or any other method. As long as it gets removed.

      1. Install node via this website: https://nodejs.org/en/download/

      If you use nvm, you can use:

      nvm install node

      You can already check if it works, then you don’t need to take the following steps with: npm -v and then node -v

      if you have nvm installed:
      command -v nvm

      1. Uninstall npm using the following command:

      sudo npm uninstall npm -g

      Or, if that fails, get the npm source code, and do:

      sudo make uninstall

      If you have nvm installed, then use: nvm uninstall npm

      1. Install npm using the following command: npm install -g grunt
      • 4
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    You must login to add an answer.

    Forgot Password?

    Sidebar

    Ask A Question
    • Popular
    • Kenil Vasani

      SyntaxError: invalid syntax to repo init in the AOSP code

      • 5 Answers
    • Kenil Vasani

      xlrd.biffh.XLRDError: Excel xlsx file; not supported

      • 3 Answers
    • Kenil Vasani

      Homebrew fails on MacOS Big Sur

      • 3 Answers
    • Kenil Vasani

      runtimeError: package fails to pass a sanity check for numpy ...

      • 3 Answers
    • Kenil Vasani

      Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains ...

      • 2 Answers

    Explore

    • Most Answered
    • Most Visited
    • Most Voted
    • Random

    © 2020-2021 ErrorCorner. All Rights Reserved
    by ErrorCorner.com