Comments (8)
Heh, I didn't realize most linux distros included node now!
The more I think about it, the more I don't think it would be a bad thing to have it on npm. Our package.json is currently only there for leveraging npm for tests/build/release scripts. Since the release process is already automated, including npm-publish in the mix wouldn't be difficult...
I think we might give it a shot.
from nodenv.
A little inception-y, no?
Installing nodenv through npm would mean having a node installed first. And that's supposed to be nodenv's job (to manage installing and switching nodes). More confusingly, it would mean that nodenv would be installed within a node installation. (Since the default global node modules live under NODE_PREFIX/lib/node_modules/
) So assuming that one did have a node installation available with which to install nodenv, and assuming that one wants to manage all their nodes with nodenv (kinda the point), there would be a high probability of the original node being uninstalled; thus removing nodenv itself.
Given that homebrew users who install and use nodenv frequently still install a 'system' node via homebrew, I can see having a "bootstrap" node with which to install nodenv. Of course, for that scenario, homebrew users would typically use homebrew to install nodenv. ;)
For non-mac users, I suspect the idea of having nodenv itself live under a node (especially one that it didn't manage) would be weird. But I could see evidence to the contrary.
How would you address the scenarios I've outlined above with regards to bootstrapping nodenv through an existing node, and dealing with nodenv living under a node?
from nodenv.
Almost all Linux distributions have a Node, usually a decent one. Almost all use of nodenv is to haul out some relatively ancient version of Node.js for some neglected project that needs some old version.
I definitely had trouble installing Nodenv when node already existed on Linux. I'm not sure if this mates with your proposed nodenv within node issue or no, but it could well have.
I don't know enough about how Nodenv functions to guess at how I'd change it's implementation. It seemed odd to me that npm install -g nodenv resulted in something very unexpected happening. And just running through alternatives, n, nave, node-bin, and avn all are npm installable, and I rather expected something similar.
It's fine if this is not a goal for nodenv. There are quite a number of other installers that are not themselves npm installable. I do think it'd be a great capability. I don't have any technical suggestions though for how to satisfy nodenv's expectations for where it thinks it'll find stuff. Thanks for the discussion on installation.
from nodenv.
from nodenv.
I don't see the point in this. I kind of get what @rektide is saying, but if this is intended to be like rbenv or pyenv (which it is) you aren't going to use your system ruby to install rbenv. You install it to manage the ruby versions. Being on npm does nothing but cause confusion. Which is the global node version now? Technically the system node is if it's managing other node versions.
from nodenv.
Yeah this feels a bit off to me. The official yarn docs, for example, tell you to install via Homebrew. It is listed on npm but I actually didn't see any instructions on their site mentioning npm. I would think it makes more sense for nodenv
to target apt-get
and other system package managers rather than node, since one of the main reasons to start with nodenv
is that you don't already have node.
from nodenv.
So I've decided to go ahead and publish on npm.
The deciding factor is that many of the nodenv plugins require a "local" nodenv installation or stubs for their test suites. While it's not difficult to just clone nodenv locally, it's a lot easier to include nodenv itself as a devDep for these plugins. That makes the CI build cleaner and makes it easier to validate against a range of nodenv versions and to test against pre-releases, etc.
And lastly, I suppose it wouldn't be the worst thing in the world if nodenv itself were installed on the OS or system node (eg, homebrew's node) and then separately had nodenv managing all the rest.
from nodenv.
https://www.npmjs.com/package/@nodenv/nodenv
from nodenv.
Related Issues (20)
- Script to install/update nodenv on a shell (linux/mac) HOT 1
- How do things like yarn installs work within nodenv? HOT 3
- Support Corepack HOT 6
- Question: how to best run globally installed npm module? HOT 4
- Question: How would I go about removing nodenv and all node instances from a server? HOT 1
- Advice: nodejs latest release does not appear in $nodenv --list HOT 4
- strange undesired behavior when installing global dep HOT 1
- GPL License Compliance Issue HOT 2
- homebrew formula broken HOT 1
- Installing global package with yarn will not yield to a shim after rehash HOT 2
- `nodenv install` tries to use python and fails on MacOS Monterey 12.3 and later and fails HOT 6
- Support pnpm HOT 5
- In addition to .node-version, support .tool-versions and .nvmrc HOT 4
- Download fails with no error code
- No Debian / Ubuntu package available in the official repositories HOT 4
- Create Debian installation packages HOT 1
- Not respecting makefile HOT 2
- RBENV reference in the README HOT 2
- Documents HOT 1
- nodenv init creates duplicates in PATH HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodenv.