Git Product home page Git Product logo

nodenv-npm-migrate's Introduction

nodenv-npm-migrate

nodenv-npm-migrate is a nodenv plugin that provides a nodenv migrate command to migrate npm packages from one Node version to another.

This plugin was forked from pyenv-pip-migrate.

Installation

Installing as a nodenv plugin

Installing nodenv-npm-migrate as a nodenv plugin will give you access to the nodenv migrate command.

$ git clone [email protected]:nodenv/nodenv-npm-migrate.git "$(nodenv root)/plugins/nodenv-npm-migrate"

This will install the latest development version of nodenv-npm-migrate into the $(nodenv root)/plugins/nodenv-npm-migrate directory. From that directory, you can check out a specific release tag. To update nodenv-npm-migrate, run git pull to download the latest changes.

Installing with Homebrew (for OS X users)

Mac OS X users can install nodenv-npm-migrate with the Homebrew package manager. This will give you access to the nodenv-migrate command. If you have nodenv installed, you will also be able to use the nodenv migrate command.

This is the recommended method of installation if you installed nodenv with Homebrew.

$ brew install nodenv/nodenv/nodenv-npm-migrate

Or, if you would like to install the latest development release:

$ brew install --HEAD nodenv/nodenv/nodenv-npm-migrate

Usage

Using nodenv migrate with nodenv

nodenv-npm-migrate uses npm ls --global --depth=0 to dump all installed packages in a Node version, and then tries to npm install them into another version.

Let's say if you have following two versions in nodenv.

$ nodenv versions
* 0.12.0 (set by /home/jawshooah/.nodenv/version)
  iojs-1.6.2
$ npm ls --global --depth=0
/home/jawshooah/.nodenv/versions/0.12.0/lib
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

To migrate installed packages from 0.12.0 to iojs-1.6.2, use nodenv migrate.

$ nodenv migrate 0.12.0 iojs-1.6.2
$ nodenv global iojs-1.6.2
$ npm ls --global --depth=0
/home/jawshooah/.nodenv/versions/iojs-1.6.2/lib
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

Credits

Forked from Yamashita, Yuu's pyenv-pip-migrate by Josh Hagins and modified for nodenv.

nodenv-npm-migrate's People

Contributors

jasonkarns avatar jawshooah avatar rushvora avatar toc-me[bot] avatar yyuu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.