run the nodejs application on a system that does not have a node

advertisements

I have developed a nodejs application for a client, but obviously asking a client to install nodejs and npms in their system does not look good.

NPM's does not work if we simply copy paste them, we require to do npm install 'npm name', which is also an issue.

Assuming that client does not have internet access in their system, I want a single exe or some file which on click can work without any need to install any npms or nodejs. Is there something which can make it happen? I am sure there must be, which I am missing. I will be grateful if someone can help me in this

Thanks in advance

UPDATE

I am not getting option to answer my question so updating the question itself

How to install NodeJS project locally without internet connection?

this was really helpful.. that is how I can zip my modules and install it at some other machine .. and

https://github.com/jxcore/jxcore

this can be useful to run project as a single file


The professional way to do this is to build a locally-installable package for your client's appropriate package management system.

All major Unix-derived operating systems (and even Windows, sortof) ship with a robust package management system which was designed with this sort of scenario in mind.

  • Fedora / Redhat / CentOS - Building an RPM package
  • Ubuntu / Debian / Windows (Windows Subsystem for Linux) - Building a DPKG
  • Mac OSX - pkgbuild
  • FreeBSD / OpenBSD - This is a bit trickier to do for a package like Node.JS for a number of reasons, but there are plenty of resources online.

If you or your clients can't provide the Windows Subsystem for Linux, there are perhaps dozens of projects from nexe to the Closure compiler for building a Node project as a single executable for a diverse set of platforms.

If you've got the itching feeling that you have too much free time, V8 also includes tooling for targeting code emitted from CrankShaft for arbitrary instruction sets with the d8 debugger. I've heard stories of sufficiently "sophisticated" (read: unhinged) programmers wrapping this in a PE/COFF for Windows à la SBCL Common Lisp 'core dumps'.