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

Question: Offline installs #1810

Closed
hawkeye64 opened this issue May 13, 2018 · 7 comments
Closed

Question: Offline installs #1810

hawkeye64 opened this issue May 13, 2018 · 7 comments
Labels
installing node Issues with installing node/io.js versions. installing nvm Problems installing nvm itself

Comments

@hawkeye64
Copy link

I have been searching for answers for several days now, but have not found any adequate information, so now going straight to the source.
Several of our clients will be wanting to install our software in an offline environment.

  1. Given we have downloaded a release version of the NVM source, will running the install.sh script properly install it in an offline mode?
  2. If so, can NVM then be used to install node from a tgz file?
@ljharb
Copy link
Member

ljharb commented May 13, 2018

  1. No, install.sh requires git/curl/wget and downloads from github. You'll want to replicate the steps manually in order to prep an environment to have nvm already installed prior to going offline.
  2. although nvm has a cache - and thus, you could manually prepopulate it with a tgz file - it relies on the nvm ls-remote output that it fetches from nodejs.org. You could set the NVM_NODEJS_ORG_MIRROR and NVM_IOJS_ORG_MIRROR env vars, but they'd have to point to a URL that was accessible and contained index.tab in the proper format (at which point you could also have that server set up to serve node tarballs).

If your use case requires no network connection whatsoever, and you're unable to stand up a local webserver to mirror nodejs.org/dist, then your only option would be to preinstall nvm and the node versions you need, prior to disconnecting.

@ljharb ljharb added installing node Issues with installing node/io.js versions. installing nvm Problems installing nvm itself labels May 13, 2018
@hawkeye64
Copy link
Author

hawkeye64 commented May 14, 2018

Thanks for the info. Clients have these systems in remote areas that either have no bandwith or sometimes close to 3G speeds. Any roadmap for future support of offline install by nvm and node via nvm? I would say no, but can't hurt to ask just in case.

@hawkeye64
Copy link
Author

Do you think it's be possible to tar the .nvm in the home folder and transfer it to the appropriate device, given the profile files were also modified? I should note that all of our devices have the same user on them.

@ljharb
Copy link
Member

ljharb commented May 14, 2018

I think perhaps caching index.tab and enabling offline use for a warm cache is something i might be willing to add; full offline support tho doesn’t seem particularly valuable.

Yes, absolutely you could tar up the nvm folder, with node/npm included, and manually replicate the profile files - provided that the machine architecture and OS on the source machine identically matched the target machine.

@a7993n
Copy link

a7993n commented May 15, 2023

I do have same issue, anyway to save a cache version of packages from the first install ?

@smprather
Copy link

I work on a secure system cut off from internet, but I need to use nvm. I would think this is pretty common. I can manually transfer files in. Is there a manual step-by-step offline to achieve the same as online methods? Or do I need to start hacking the bash scripts and hope I don't hit a wall? Thanks.

@ljharb
Copy link
Member

ljharb commented Jun 5, 2023

@smprather yes, you first nvm install all the node versions you need while online, and then you can move the contents of $NVM_DIR wherever you want, and all the local commands will work just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installing node Issues with installing node/io.js versions. installing nvm Problems installing nvm itself
Projects
None yet
Development

No branches or pull requests

4 participants