Installing and Upgrading Intern without NPM - intern

Is there any way to install Intern without npm?
I'm not going to get the rights to download files through our corporate proxy and I can't convince anyone to spend a few dollars to upgrade to Artifactory Pro and use its npm support.

You could download it from GITHub [https://github.com/theintern/intern/releases/tag/2.2.2] at home, or on a computer of a friend (outside of the Proxy). But that are the sources which must be compiled. And even if you could download the node module then, there still be dependencies, which would have been resolved by hand. (npm could not add them automatically).
One idea is to put your project on a stick or external HD. Take it to Computer outside of the proxy. Install node on this computer. Install Intern and put it back to the work computer.

Related

How to install node + vue web program offline

Hey Im looking for a good and solid solution for how to install node + vuejs full stack web program in offline. Our customer can not have any internet access so we have to install it in offline but cant imagine how to do. First idea was copy all the code including node modules and just paste it to the customer’s computer and run it. However I do bot believe this is gonna work.
Customer uses Centos as fas as I know.
Thanks in advance.
Anyone who's looking for a 'how to' steps for offline centOS install.
Preparation
a laptop or Computer can access to the internet.
Install VM or whatever you want to use to set the whole project in CentOS
Install CentOS7 in your VM and connect to the internet.
!! Important!!
You MUST Follow your customer's centOS install options. There are many options you can select when you install your centOS. When you install your project in offline, you have to have all the packages(or dependencies) depends on OS installed options. If your customer installed CentOS as full development package, then you don't have to have additional dependencies. if not, you need a lot.
download all the packages you need as CentOS version. In my case, my web is based on 'Nodejs + Express', 'Vuejs + AntDesign', pm2, nginx so I have donwnloaded nodejs, nginx, and pm2. Others are gonna work without any problems once you've installed Nodejs. If you need some additional packages or dependencies(it will be written in the terminal message during installation process of node or others) then write down all the packages and install them.
Set your project in CentOS and test if it works(build the project if it's needed). If it does not work, check the path, dependencies, or anything else might be related(DO NOT FORGET LINUX AUTHORITY!!).
If everything works, then get all the installation file(.rpm) you've installed.
install another CentOS in VM as OFFLINE
install in offline CentOS .rpm installation files you get from online CentOS above.(no. 6) (DO Exactly same installation but this time, with only the files. not from the online repositories)
Test
If it's not working, check the path, root or user's authority in CentOS.
About PM2.
As PM2 is for the process management, you have to install it globally. However, sometimes(I tested 2 times in exactly same set environments. First try did work but second try didn't work. Couldn't find why. I've tested 4.3 and it works every time so I suggest you to get the pm2 version under 4.5) pm2 v.4.5 or up does not support offline installation with npm so All you have to do in online centos:
npm pack pm2(whatever you've set the name when you installed pm2 in online centos, if you didn't change the package name then npm pack pm2 will work, command path doesn't matter. pm2 is installed globally so when you run npm pack pm2 anywhere it will take global installed pm2 whatsoever) This will pack all the dependencies to install pm2 in offline. Take this packed file(.tgz) and install this in offline.
Test
If it's not working and you couldn't find the reason why, leave a comment or answers down below. I will try to help as much as I can.(I'm Korean and live in Korea. Please be aware of time difference)

Does "npm install electron" also downloads chromium?

I'm trying to start the development of an electronJS app at my company, but I'm having a lot of trouble to install the framework by the command line "npm install electron". I have consulted the TI and our guess is that when running this the npm command, it tries to download chromium or other executables files and because of that our company proxy blocks the downloads of these files. I have installed chromium using a different way that is permitted by the proxy, so having chromium installed is not a problem. So summarizing I have two questions?
Is chromium really downloaded with "npm install electron"?
Is there any way I can install electronJS not using "npm install electron" or without downloading chromium?
I hope you can help me,
thanks
Note: I can't download any source code from github too
Yes, ElectronJS comes with Chromium. The application windows you see are Chromium instances.
It's also stated on their web page under "Web Technologies".
Electron uses Chromium and Node.js so you can build your app with HTML, CSS, and JavaScript.
Another place from which you can get it that they've provided on their GitHub page is CircleCI, but the website seems to require registration.
Tip: when you're installing ElectronJS, I recommend doing it as stated by the official guide -> npm install electron --save-dev and not just npm install electron. As to why, you can read the reason over here.
Another alternative is to download everything properly from somewhere else, e.g. your home, neighbour, café, etc., onto a USB Flash Drive and then when you get to your work place, have the IT department check the USB - once it's confirmed that it's safe, copy it to your work computer (make sure to consult with the apropriate department if you can do that).

How to install just node modules without internet

There is a way to install npm package to a machine which doesn't have internet acccess is, using npm pack in machine with internet acces, copying it to machine without internet and running npm install <tar> in it. But npm pack, packs whole project.
But I want to manage and install the modules myself, without the opportunity for the developers to add/remove any modules. So I just want node_modules to be packaged. And then want to install it to machine without internet.
For example when developer push his/her commits to origin, I want to get node_modules from ftp etc. and codes from GitLab then go on continuous integration with this static node_modules.
How can I do that?
There is a solution to manage the modules yourself: you can store your node_modules in its own repo in which your developers will only be able to clone/get the repo and not contribute/modify it.
Hope this helped you
This can be done, please look at Installing a local module using npm? . You can FTP or whatever to get the packages and install them using npm.

How to manage npm install in a system without internet connection

I am facing challenges while creating package for all the clientside components of my project in a system which does not have internet connection (for windows).
I have installed NPM for windows in the system. I need to manage the node_modules and run gulp commands in the system to create the package.
Since there is no internet connection in the box, I decided to copy the node_modules from my local box to the box which does not have internet connection.
For copy task, I am using msbuild script but somehow it is not working for me. Also, I see that when I am trying to copy the node_modules manual from one folder to another folder I am unable to copy.
Installed Node version : v0.12.2
NPM version: 2.7.4
Can anyone help me to provide any working sample to fix the above problem.
I think your approach is generally sound. You can build on the internet connected computer no problem! Copy files over with a usb stick if you like.
Here are some tips that might help solve your problems.
If the box is offline, develop on your local machine and deploy to the box
If possible do the gulp steps also on your local machine
Otherwise you need to run the local directory install of gulp. e.g.
node node_modules\gulp\bin\gulp.js build
because you won't be able to npm install -g gulp
Point 3 will work for other global npm_modules too btw
If you are facing long paths (> 256 characters) which can cause copy problems
Try using npm dedupe to remove duplicates
Or try copying to a shorter path e.g to c:\proj instead of to c:\very\long\path\proj
Or explicity install a dependency which has a long path
e.g
npm install deepdep#1.2.4
and then prune that folder from the original
rm node_modules\package\node_modules\package_with_too_many_nested_folders
Or Install the latest npm (v3.0 or higher) which solves this issue once and for all
e.g. npm install -g npm
which will build a much flatter hierarchy for your packages. Requires removing and reinstalling all packages.
Point 5 is a notorious issue on windows which is not a problem on linux because paths can be extremely long. (unless you are mounting a windows a windows directory from linux)
Personally I would go straight for the latest npm version but you have a number of ways of getting around the issue if this is not possible.

Can you use Cordova in an offline intranet environment?

In the government organisation I work for we have many workstations on a closed intranet network. There's a way to get internet but that doesn't work for every application.
I'm doing a bit of research to Cordova and Phonegap, and I'd like to know if it's possible install Cordova and compile projects with it, all while fully offline.
I can install Node.js, the JDK, the Android SDK and ANT fully offline. However, the installation command for Cordova is 'npm install -g cordova'.
Is there a workaround for this? I know there's a source zip file download but I simply don't know where to put all those files.
Also, upon building a project with Cordova I can see it checking for latest versions of plugins on github. I think it's possible to download the plugins offline. But would the build process succeed if the plugins version checks fail?
try npmbox, it is the new name of npmzip which will allow you to install offline npm packages by one file

Resources