Coder Social home page Coder Social logo

Release on npm about nodenv HOT 8 CLOSED

rektide avatar rektide commented on July 21, 2024
Release on npm

from nodenv.

Comments (8)

jasonkarns avatar jasonkarns commented on July 21, 2024 1

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.

jasonkarns avatar jasonkarns commented on July 21, 2024

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.

rektide avatar rektide commented on July 21, 2024

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.

elektronik2k5 avatar elektronik2k5 commented on July 21, 2024

from nodenv.

chriscarpenter12 avatar chriscarpenter12 commented on July 21, 2024

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.

burlesona avatar burlesona commented on July 21, 2024

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.

jasonkarns avatar jasonkarns commented on July 21, 2024

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.

jasonkarns avatar jasonkarns commented on July 21, 2024

https://www.npmjs.com/package/@nodenv/nodenv

from nodenv.

Related Issues (20)

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.