Move node_modules for other computer without network access - node.js

In this case,
I have one Project with some Packages and Dependencies (Nodejs). I use NPM for manager.
My client created one Web Server VM for me, without network access, just one Rule on the firewall to I can call my API.
I need some way to my project works perfectly inside my client, but my VM inside my client don't have network access.
I searched about this on Google, but every solve results have to install other dependencies, and I need something like copy and paste for my application will execute perfectly.
I saw this dependencies, but, I'm not sure if I need to install the dependencies inside my client for get my Packages from node_modules for my application to work well.
I saw: npmbox, yarn, npm-offline.
If someone use and know how to do that, please help me.
If have another way to do solved, I would like to hear.

Related

How can I run "msnodesqlv8" on a computer without internet

I have a Node.js API on a Windows computer without internet access and I need to access data from a Microsoft SQL Server database. I have the module "mssql" however I need to use Windows authentication. I found online that this method requires the module "msnodesqlv8," however when I install the module on an internet-connected device and then move the files onto the non-internet device, the module won't run. The error I receive when I run the API indicates that the module needs to be rebuilt. Whenever I run "npm rebuild," the build attempts to install the dependencies - which of course is not possible without internet.
To try to circumvent this issue, I removed the dependency list prior to rebuild, but the rebuild still snags trying to install "safe-buffer." I don't know where this install is getting triggered. When I search for "safe-buffer" in the project, no references to "safe-buffer" are found. My assumption is that a dependency is trying to use it and I have not skimmed through every dependency yet.
I also tried packing the "msnodesqlv8" module, then installing it from the .tgz file, but this produced the same errors.
One avenue I have not yet tried is packing the module on the internet device, then transerfing the .tgz file.
Any recommendations would be awesome - I am blocked until I can solve this issue.
I was able to solve this problem by downloading a prebuild from the Github releases. I noticed in the stack trace of the rebuild that the process was accessing a specific build from this link, so I moved it into the "prebuilds" folder where it was expecting it, and the module powered up on the next rebuild.
This process has to be replicated on every device, from workstation to servers, but it works. Just make sure you download the build that matches your system.

If I provided incorrect subdomain name during Kabanero Foundation installation, how to fix it?

I provided incorrect subdomain name during Kabanero Foundation installation on OKD. Now my Application-->Routes are wrong. How to fix that?
For Kabanero Landing Page, my link is: https://kabanero-landing-kabanero./
I tried https://kabanero-landing-kabanero./ but I get
Application is not available
The application is currently not serving requests at this endpoint. It may not have been started or is still starting.
Expected: Kabanero Landing Page
Actual: Application is not available
The application is currently not serving requests at this endpoint. It may not have been started or is still starting.
There really is no good way to fix it. There is not a good manner to change the routes automatically. Assuming you are early in your install, you should be able to clone the 0.2.0 (if you installed 0.2.0) support scripts from https://github.com/kabanero-io/kabanero-foundation/tree/0.2.0/scripts and run the uninstall-kabanero-foundation.sh script to remove the foundation and reinstall. You should be able to keep the OKD install that you have done.
If there are enough people that hit this, I can put a requirement in place to provide an update script to change this value and restart.

How could I download many NPM modules without npm install?

Okay, so I get it that I might be looking for a totally unexpected behavior.
My current company has nothing for me to do for a few weeks, so I would like to start a side project. The problem is, the firewall is really strong here, so I cannot download anything with Git or Npm. I also am not allowed to do any request to the IT support, since I am not in my company's office but some offices owned by a client (that applies said strict policy). In short, I am stuck with firewall and proxy policies that I cannot modify.
I may download a module's zipped archive through the browser, and install it from there. However, it has multiple dependencies, that themselves have dependencies, and so forth. And since I cannot run npm install to retrieve the dependencies, I'm stuck.
I saw multiple possible solutions in order to solve those dependencies issues:
make NPM run all requests and downloads through the browser, since browsers are allowed to access to the network. I don't see any options for that so far.
Download all required dependencies as tarball and step-by-step install each of them. Because of the potential number of dependencies being huge, I am looking for a huge bulk of modules commonly used to download once.
Most solutions I find make the assumption that I may use npm install properly, while my proxy doesn't allow it.
I wouldn't like to spend days on Chrome's built in game. Any idea?
maybe you can create the project somewhere else, and then "import" it on your office local machine:
npm init
edit package.json with your dependecies
npm install
put everything on usb stick and put it on your local computer at work.
or
send an archive of the code via email and download the tarball from email at office.

Meteor ignore node_modules

I'm building an IRC bot (backed by MongoDB) and I want to give it a web interface on my server (not meteor.com). I want to use meteor because of the live-updating and because I want to learn how to use it.
For meteor to recognize that I have other subfolders that might have web interfaces (some modules will have web interfaces, and some will not), I need to have meteor run from the application root. When I do that, meteor looks inside my node_modules folder and determines that it can't run the same file twice (some duplicate dependency), then it crashes.
I either need to ignore node_modules when I run meteor, or move node_modules to a subdirectory (like meteor's lib/). I'm pretty sure I can't make npm install do that though, so what can I do?
I keep seeing people wishing for a .meteorignore, and I'm feeling that too.
For now I think the best solution is to introduce another folder between the root and the modules and setup meteor there, but I'll leave this open in case others have better ideas.

Running vline-node example on IIS

I have successfully tested the vline-node example locally, but would like to push it out to a server. I have tried to install the example as an application on an IIS8 website, placing the example code under wwwroot. I have done tried this both within the root and inside a virtual directory, pointing to the views folder. I am able to login to the application from a browser on the server, although, since javascript is turned off on the server browsers for security, so functionality is missing.
However, when I try to access the site from a remote browser I am not able to login. Actually, I can see that there is something wrong with my paths, as the include files are not found.
The more I've thought about this the more confused I've become. I'd like to run this under IIS, but wonder if that makes sense. Can someone offer a clean solution for hosting the vline-node example on a Windows Server, ideally under IIS?
Since you are using the node example, you'll need to make sure that node is actually running on your IIS server. Here's a SO response that may be helpful: How to run Node.JS server for a web application?
Note that in our node example the "main" file is vline-node.js, so use that in place of the app.js that is mentioned.

Resources