![]() ![]() add the prefix command and/or script in package.json. ![]() Of course you may want something that does not require the need to be proactive when switching versions, and while you can always install a separate version of npm somewhere and symlink it the same way you did the node version, that may become confusing over time when it comes to upgrading npm. Now you are ready to install global packages for the second version! Each time you want to switch versions you can simply swap the prefix, and since we are looking for a simple process this probably won't happen too often. Of course we do not want to mix npm packages with the two versions, so let's fix that by making a new npm directory for the version: $ mkdir ~/.npm4 Now you can use the command node for your previous version, and node4 for the version. $ brew install & brew unlink it's installed and unlinked, go to the folder /usr/local/bin, and add a custom symlink for the other version you want access: $ cd /usr/local/bin ![]() Start by installing the other version of node that you want to use, for instance and then unlink that version's symlinks (you can use any brew installed version). Instead of installing a node version manager, you can actually create a 2nd "node" version with another homebrew node.js install. Luckily there is a good way to do this if you are someone like myself who finds nvm to be overkill, especially if you only need one version for an app/api support (e.g. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |