Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can this be used to create/download npm as a standalone executable? #3237

Closed
guest271314 opened this issue Nov 23, 2023 · 8 comments
Closed

Comments

@guest271314
Copy link

Operating system and version:

Linux

In the archive download we have various files named "npm", some in "/node/lib/node_modules/npm/bin/".

Simple question:

Can this (nvm) be used to create/download npm as a standalone executable if such an executable exists?

@ljharb
Copy link
Member

ljharb commented Nov 23, 2023

No, of course not. npm can’t ever work that way, and nvm is a node version manager.

@ljharb ljharb closed this as not planned Won't fix, can't repro, duplicate, stale Nov 23, 2023
@guest271314
Copy link
Author

So there is no standalone npm executable or shell script that either Node.js nor GitHub publishes, correct?

@guest271314
Copy link
Author

npm can’t ever work that way

So, if I'm reading your restriction on the functionality of npm correct, we can't ever create a single executable application --experimental-sea-config=... with node and npm compiled into a single executable?

So we don't have to carry around all the bagge of the default Node.js release archives, and be consistent with how Deno, Bun, QuickJS https://bellard.org/quickjs/binary_releases/ provide a way to get directly to the JavaScript runtime executable without a bunch of other folders and files.

@ljharb
Copy link
Member

ljharb commented Nov 23, 2023

I’m sure you can, but then it wouldn’t be npm anymore.

You’ve exhausted his discussion already in node and npm’s repos; there’s nowhere left to have it, and here certainly isn’t the place.

@guest271314
Copy link
Author

I’m sure you can, but then it wouldn’t be npm anymore.

I don't understand that.

You’ve exhausted his discussion already in node and npm’s repos; there’s nowhere left to have it, and here certainly isn’t the place.

Wow. Here I am just asking questions, in a civil manner.

Why do even reply to me when you have contempt for my use cases? You know you can recuse yourself and ask one of your colleagues to reply.

Anyway, thanks for your answer. Have a great day.

@ljharb
Copy link
Member

ljharb commented Nov 24, 2023

I have no colleagues; I’m the only nvm maintainer.

@guest271314
Copy link
Author

Oh, well then. I suppose I have to just keep asking questions and getting your answers for Node.js world.

I thought I was asking about nvm, not "You’ve exhausted his discussion already in node and npm’s repos; there’s nowhere left to have it, and here certainly isn’t the place.".

I decide when I have exhausted my remedies.

I'm trying to eliminate npm from the equation. There's the Node.js way of doing things then there's the rest of JavaScript runtime world.

Take a GitHub repository that uses CommonJS exclusively. Why install npm (npm-cli), whatever, when all of the dependencies are available on jsDelivr as Ecmascript Modules that can be dynamically imported in memory rather than hardcoding in the repository?

@ljharb
Copy link
Member

ljharb commented Nov 24, 2023

npm can’t be eliminated from the equation when you’re dealing with JavaScript ¯\_(ツ)_/¯

I’m going to go ahead and lock this, because past experience shows this will continue being off topic. I answered your question about nvm.

@nvm-sh nvm-sh locked as off-topic and limited conversation to collaborators Nov 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants