Does "npm install electron" also downloads chromium? - node.js

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).

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)

SPFx development setup offline

Is there anyway we can setup SharePoint framework development environment offline without internet connection?
Following this instruction,
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development-environment
It failed on the second step,
npm install -g yo gulp
If your node modules were already installed, then yes, you can develop offline. But the npm install command very specifically downloads and installs the package you specify.
If you can find a colleague who already has those modules installed and you can copy from their machine to yours, you could potentially get it setup without an internet connection, but you are going to have to get those SPFx packages (Yeoman Gulp and Microsoft Generator) from somewhere.

Installing and Upgrading Intern without NPM

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.

How to compile lesscss using node.js

Hi,
I have finished to code my website using lesscss client side and now want to compile less so I have donwloaded node.js. My website is running on localhost and I want first to know:
where I have to install node.js
what I have to do next ( commands lines tools, commands lines etc. ).
If someone can help me because I'm a newbie in this field.
Thanks.
You can install the LESS compiler directly from npm.
Install node.js. Go to this page and download the installer for your platform.
If you're on Windows, download the .msi; if you are on OSX, download the .pkg file. Whenever possible, download the 64-bit version (unless your system is running only 32-bit hardware and software). If you are on Linux and you want to use package managers, see this page.
Once you have node.js installed, you should also have npm, which is node.js Package Manager. You can open a terminal/console and run npm -v to make sure everything is installed correctly.
Eventually, you can install the LESS compiler by simply executing:
npm install -g less
(note: on OSX and Linux you may need to run this with sudo: sudo npm install -g less).
The LESS compiler will then be available as the lessc command. See examples here.
PS: Some GUIs also exist for simplifying working with lessc. Google "less gui windows/mac/linux" to see many results, like this one for Mac.
it's not mentioned what to do after installing node.js and installing less compiler on your node.
Go to your folder where you are hosting your project locally and then type styles. less styles.css. This should initiate the conversion from less to CSS at the node command prompt.

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