Problem with nodejs

Hey guys, I’ve recently installed new kde plasma. It works well. However, I have encountered a problem with nodejs. Before that, I installed nodejs from GitHub - nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions step by step. Yes, it worked but, when I close my terminal then I wrote node -v, afterwards it says “zsh: correct ‘node’ to ‘_node’ [nyae]? n
zsh: command not found: node”. I don’t know why it happens. I just followed the guide for installing nodejs. By the way, I have vs code, there nodejs works, but its terminal says “bash: ‘source: command not found” when I open it. Finally, I always have to write “export NVM_DIR=”$([ -z “${XDG_CONFIG_HOME-}” ] && printf %s “${HOME}/.nvm” || printf %s “${XDG_CONFIG_HOME}/nvm”)"
[ -s “$NVM_DIR/” ] && . “$NVM_DIR/” # This loads nvm" if I want to use nodejs then it works. So, can you guys help me.

add the commands to the bottom of your .zshrc

See the trouble shooting section on github

Other developer pitfalls on Manjaro

how can I do this? sorry, I’m relly new on this system

Edit your ~/.zshrc file (with vi, vim, nano, gedit, whatever you prefer), and add the commands you mentioned (that start with export NVM_DIR) to the end of it.

Those commands basically run the executable file, and adding them to ~/.zshrc will run them every time you open a terminal session (which, by default in Manjaro, is zsh, hence the file name, instead of, say, .bashrc).

Note that it’ll be hard for you to get “step-by-step instructions” in this forum like a one-line command to copy+paste. The instructions @linux-aarhus gave were on point and not Manjaro-specific. Manjaro is not targeted at new Linux users. Just to keep in mind. :blush:

1 Like