nvm | Node Version Manager - POSIX-compliant bash script | Runtime Evironment library

 by   nvm-sh Shell Version: v0.39.3 License: MIT

kandi X-RAY | nvm Summary

kandi X-RAY | nvm Summary

nvm is a Shell library typically used in Server, Runtime Evironment, Nodejs, NPM applications. nvm has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

nvm is a version manager for node.js, designed to be installed per-user, and invoked per-shell. nvm works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and windows WSL.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              nvm has a medium active ecosystem.
              It has 67791 star(s) with 7270 fork(s). There are 968 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 325 open issues and 1653 have been closed. On average issues are closed in 41 days. There are 59 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of nvm is v0.39.3

            kandi-Quality Quality

              nvm has 0 bugs and 0 code smells.

            kandi-Security Security

              nvm has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              nvm code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              nvm is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              nvm releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of nvm
            Get all kandi verified functions for this library.

            nvm Key Features

            No Key Features are available at this moment for nvm.

            nvm Examples and Code Snippets

            No Code Snippets are available at this moment for nvm.

            Community Discussions

            QUESTION

            Z_DATA_ERROR, ERRNO -3, zlib: incorrect data check, MBA M1
            Asked 2022-Mar-17 at 00:11

            Recently I face an issues to install my dependencies using latest Node and NPM on my MacBook Air M1 machine. Then I found out M1 is not supported latest Node version. So my solution, to using NVM and change them to Node v14.16

            Everything works well, but when our team apply new eslint configuration. Yet, I still not sure whether eslint was causes the error or not.

            .eslintrc ...

            ANSWER

            Answered 2022-Mar-17 at 00:11

            I had a similar problem with another module.

            The solution I found was to update both node (to v16) and npm (to v8).

            For Node, I used brew (but nvm should be OK).

            For npm, I used what the official doc says :

            npm install -g npm@latest

            Source https://stackoverflow.com/questions/69793334

            QUESTION

            Unexpected token '.' when run create-react-app
            Asked 2022-Mar-14 at 14:24

            I am trying to create a new React app using this command on Windows using Node 16.14

            npx create-react-app my-app

            But it fails with this error npm ERR! Unexpected token '.'

            From the log, this is the stack trace:

            ...

            ANSWER

            Answered 2022-Feb-25 at 17:26

            Try to downgrade npm version. I had this same, on 16.14.0. I recommend nvm for changing node version. For example: nvm install 14.18.1 nvm use 14.18.1

            Source https://stackoverflow.com/questions/71259175

            QUESTION

            ng --version showing The current version of Node (16.8.0) is not supported by Angular
            Asked 2022-Feb-26 at 17:50

            I just installed the latest version of node(16.8) using nvm and angular/cli(12.2).

            But when i run ng --version

            It shows the following:

            Warning: The current version of Node (16.8.0) is not supported by Angular.

            I tried to downgrade the node and installed node 14.15 but ng is not working anymore.

            Should i ignore the warning and use node 16?.

            Why is ng not working with node 14.15?.

            PS: I am using nvm to manage the different node versions

            ...

            ANSWER

            Answered 2021-Sep-07 at 14:54

            You can use Angular CLI with Node >=14 version. Command not working, because you switched to another nvm node version with it's own installed packages. You have to install angular cli again on your node 14.15. npm install -g @angular/cli

            Source https://stackoverflow.com/questions/69090357

            QUESTION

            when i use vscode extension Remote-ssh to connect to my remote server, i found vs cannot install vscoe-server in host
            Asked 2022-Feb-24 at 05:55

            this is the log when vscode install vscode-server in host

            i found that it got vscode-server commit id as follow log:

            ...

            ANSWER

            Answered 2022-Feb-24 at 05:55

            I had this problem as well since this morning and what was odd for me was that I could SSH from the terminal to the target host with no problem.

            After some debugging, it seems like the Remote - SSH extension is causing the trouble. The following two options worked for me. Either:

            1. Downgrading the extension to 0.70.0 works for me. The current version (0.74.0 as of now) was updated just two days ago and I think this update is causing the trouble.

            2. If you would like to keep the current version, then turning off remote.ssh.useLocalServer also works. If you're on a mac, go to Code > Preferences > Settings (Cmd + ,) and then type remote.ssh.useLocalServer and it'll show the option which is turned on by default. Turning this off did the trick for me too.

            Source https://stackoverflow.com/questions/71231718

            QUESTION

            zsh: bad CPU type in executable: node
            Asked 2022-Feb-15 at 21:39

            I have installed nvm using brew. After that, I installed node version of 16 through nvm and check the current version using node -v to see whether the node is working properly. However, when I install version 14 or any other previous versions and runs node -v, it gives this "zsh: bad CPU type in executable: node" message and I have no idea what to do about this, though, installing node v17 and running node -v works as expected. Below are the snippet of the said commands.

            ...

            ANSWER

            Answered 2022-Feb-15 at 21:39

            This is CPU related issue. It seems that your MacBook Air's CPU is Apple Silicon (M1).

            You need update node version architecture on NVM.

            Source https://stackoverflow.com/questions/71122488

            QUESTION

            CircleCI: Use nodejs version 12
            Asked 2022-Feb-10 at 06:37

            My CircleCI file is provided:

            ...

            ANSWER

            Answered 2021-Sep-10 at 03:57

            I think the issue was with the orbs as after I update to the node: circleci/node@4.7.0, I had no issue with NodeJS installation and build the project.

            This makes sense as the cI/CD pipeline not suppose to run the software and hence, the NodeJS version should be irrelevent.

            Source https://stackoverflow.com/questions/69087538

            QUESTION

            Node and npm not found after restarting macOS
            Asked 2022-Feb-05 at 17:07

            I am using my corporate's laptop and am a new mac User (used Ubuntu before) :

            • OS: macOS Monterey Version 12.2

            There are two accounts, administrator and mine - I don't have sudo rights. To install homebrew without administrator rights, I followed this Installation.

            To install the node - I used brew install node. Both node -v and npm -v were working. When I restarted the laptop, I cannot find node/npm.

            On running $ node -v, I get -bash: node: command not found (I changed my default terminal from zsh to bash and the output is the same for both of them)

            I tried this solution but couldn't find nvm in the system. Am new to mac and I believe nvm is some kind of package manager like homebrew so this solution is not applicable to me (correct me if I am wrong).

            How can I install things in my system without sudo rights and keep them permanently(like node)?

            EDIT:

            • (After adding brew to the PATH) On running - brew list|grep node, I got - node

            • $ echo $PATH gives /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/parthkapadia/homebrew/bin

            EDIT2:

            • Adding brew to path solved the issue, now I can even access node and npm (even after restarting). I used this site to add homebrew/bin to path (in zsh terminal)
            ...

            ANSWER

            Answered 2022-Feb-05 at 16:55

            The issue was homebrew's path. It was not added to the PATH variable. When I restarted the system, homebrew was no longer in the PATH (as it was temporarily added probably when I installed it). As homebrew was not added to PATH, the terminal didn't recognize brew or any package installed using it like node or npm.

            I solved it by adding Users/username/homebrew/bin to PATH. The steps I followed are -

            • cd - to move to the home directory
            • touch .zshrc to create .zshrc file as it didn't exist
            • nano .zshrc to open the file for editing
            • Added export PATH=$PATH:/Users/yourusername/homebrew/bin in the file (this appends homebrew/bin to the PATH variable)

            Now the terminal can recognize brew and hence node and npm too. Refer this for more detailed explanation on how to add to PATH in macOS.

            Thanks to all the people who helped in the comments.

            Source https://stackoverflow.com/questions/70999596

            QUESTION

            Unable to downgrade Node.js using nvm on Windows
            Asked 2022-Feb-04 at 06:30

            I'm trying to downgrade Node's version via nvm on Windows 10, but I can't get it working:

            C:\projects>nvm use 16.13.2 all
            Now using node v16.13.2 (64-bit)

            C:\projects>node -v
            v17.4.0

            (I nvm install and nvm use 16.13.2 on both 32 and 64bit; also tried to restart the command prompt, but always showing v17.4.0)

            ...

            ANSWER

            Answered 2022-Feb-04 at 06:30

            According to your output of where node

            Source https://stackoverflow.com/questions/70982056

            QUESTION

            Android Studio can't run AVD... times out
            Asked 2022-Feb-02 at 15:36

            Just got a new M1 Mac Mini and I have been having trouble running my Android projects.

            I'm using Android Studio (Bumblebee), JDK 11 (tried 17 as well), and Gradle 7.3.

            When I try to run the project from AS, it builds fine and then gets stuck on "Waiting for target device to come online" and eventually times out.

            If I try to run the emulator again I get a message that the device is already running, including a path to a lock file.

            However, I've found that if I run the emulator manually from the CLI, the emulator does open, at which point I can get AS to run the app on said emulator. So the problem is apparently just that AS can't open the AVD.

            Command line output when running emulator via adelphia$ emulator -avd Pixel_3a_API_32_arm64-v8a:

            ...

            ANSWER

            Answered 2022-Feb-02 at 15:36

            You have to update tools for AVD in the IDE. Android Emulator is 31.2.6

            Source https://stackoverflow.com/questions/70920624

            QUESTION

            NPM Error "Can't find Python executable" in MacOS Big Sur
            Asked 2022-Feb-02 at 13:09

            I've been looking for the answer to this for a good solid week now, with no success. I've looked at every StackOverflow post, every article from Google and every related Github issue I could find. Most related errors seem to be older, so I'm wondering if my issue is slightly different due to me being on macOS Big Sur.

            The issue: When I try to run yarn install in my local repo, I receive an error related to node-gyp and a python executable that is unable to be found. Here is what my terminal shows:

            ...

            ANSWER

            Answered 2021-Dec-04 at 16:08

            From the terminal messages, you are installing an old version of node-gyp (node-gyp@3.8.0). From a quick search, it seams that this version requires python 2. Python 2 should be present in Big Sur. Properly setting the path, should work:

            Source https://stackoverflow.com/questions/70098133

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install nvm

            To install or update nvm, you should run the install script. To do that, you may either download and run the script manually, or use the following cURL or Wget command:. Running either of the above commands downloads a script and runs it. The script clones the nvm repository to ~/.nvm, and attempts to add the source lines from the snippet below to the correct profile file (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).
            If the environment variable $XDG_CONFIG_HOME is present, it will place the nvm files there.
            You can add --no-use to the end of the above script (...nvm.sh --no-use) to postpone using nvm until you manually use it.
            You can customize the install source, directory, profile, and version using the NVM_SOURCE, NVM_DIR, PROFILE, and NODE_VERSION variables. Eg: curl ... | NVM_DIR="path/to/nvm". Ensure that the NVM_DIR does not contain a trailing slash.
            The installer can use git, curl, or wget to download nvm, whichever is available.
            Since macOS 10.15, the default shell is zsh and nvm will look for .zshrc to update, none is installed by default. Create one with touch ~/.zshrc and run the install script again.
            If you use bash, the previous default shell, your system may not have a .bash_profile file where the command is set up. Create one with touch ~/.bash_profile and run the install script again. Then, run source ~/.bash_profile to pick up the nvm command.
            You have previously used bash, but you have zsh installed. You need to manually add these lines to ~/.zshrc and run . ~/.zshrc.
            You might need to restart your terminal instance or run . ~/.nvm/nvm.sh. Restarting your terminal/opening a new tab/window, or running the source command will load the command and the new configuration.
            If the above didn't help, you might need to restart your terminal instance. Try opening a new tab/window in your terminal and retry.
            If you use bash, it may be that your .bash_profile (or ~/.profile) does not source your ~/.bashrc properly. You could fix this by adding source ~/<your_profile_file> to it or follow the next step below.
            Try adding the snippet from the install section, that finds the correct nvm directory and loads nvm, to your usual profile (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).
            For more information about this issue and possible workarounds, please refer here
            To verify that nvm has been installed, do:. which should output nvm if the installation was successful. Please note that which nvm will not work, since nvm is a sourced shell function, not an executable binary.
            If you have git installed (requires git v1.7.10+):. Now add these lines to your ~/.bashrc, ~/.profile, or ~/.zshrc file to have it automatically sourced upon login: (you may have to add to more than one of the above files).
            clone this repo in the root of your user profile
            cd ~/ from anywhere then git clone https://github.com/nvm-sh/nvm.git .nvm
            cd ~/.nvm and check out the latest version with git checkout v0.38.0
            activate nvm by sourcing it from your shell: . ./nvm.sh
            For a fully manual install, execute the following lines to first clone the nvm repository into $HOME/.nvm, and then load nvm:. Now add these lines to your ~/.bashrc, ~/.profile, or ~/.zshrc file to have it automatically sourced upon login: (you may have to add to more than one of the above files).
            For manual upgrade with git (requires git v1.7.10+):.
            change to the $NVM_DIR
            pull down the latest changes
            check out the latest version
            activate the new version

            Support

            Node has a schedule for long-term support (LTS) You can reference LTS versions in aliases and .nvmrc files with the notation lts/* for the latest LTS, and lts/argon for LTS releases from the "argon" line, for example. In addition, the following commands support LTS arguments:. Any time your local copy of nvm connects to https://nodejs.org, it will re-create the appropriate local aliases for all available LTS lines. These aliases (stored under $NVM_DIR/alias/lts), are managed by nvm, and you should not modify, remove, or create these files - expect your changes to be undone, and expect meddling with these files to cause bugs that will likely not be supported. To get the latest LTS version of node and migrate your existing installed packages, use.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries