"-bash:/usr/local/bin/node: No such file or directory" is displayed when running "node-v" on a Mac terminal.

Asked 1 years ago, Updated 1 years ago, 384 views

As the title suggests, when you run node-v on a Mac terminal, "-bash:/usr/local/bin/node: No such file or directory" is displayed.

what someone did

$nodebrew list
v10.0.0
v11.14.0
v12.16.3
v16.2.0

current —v12.16.3
$node-v
bash: /usr/local/bin/node —No such file or directory

The contents of the .bash_profile are as follows, so I understand that the path has been set.
(This was configured before the node was uninstalled, so I didn't mess with it.)

 if [-f to /.bashrc]; then
  . ~/.bashrc
fi
export PATH=$HOME/.nodebrew/current/bin:$PATH
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export PATH="~/.rbenv/shims:/usr/local/bin:$PATH"
if which rbenv>/dev/null;then
event "$(rbenv init-)"
fi

I tried the following page and other things for reference, but it didn't work and stopped, so I asked you a question.

How to switch node versions in nodebrew

If anyone knows how to solve this problem, I would appreciate it if you could let me know.
Thank you for your cooperation.

node.js bash

2022-09-30 21:57

1 Answers

While reading here, I restarted the terminal and it showed up without any problems.

Installing Node.js on a Mac

Therefore, I would like to conclude that it has been resolved.
Thank you.


2022-09-30 21:57

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.