The first step is to change the default system execution policy (if you haven’t already). Make sure you open up a Powershell prompt with admin privileges, otherwise you will run into problems. Below I describe Chocolately a little bit and why it is useful so you can find out more in the post or you can check out the Chocolately website, which does a much better job of explaining its benefits, how it is used and why package managers are good. If you have any recent version of Windows you should have Powershell. Hopefully you are already familiar with Powershell at least because I won’t be covering it much in this post. Things would also break pretty easily and it was just painful in general to work with. In the past, in order to install something like a programming language and its environment you would have to manually download the zip or tar file, extract it, put it in the correct place, set up environment variables and system paths manually, etc. The main tools that ease this process are Powershell and Chocolatey and these tools have significantly improved the developer and administrative experiences in Windows. Luckily, in recent years there have been some really nice additions to Windows and its ecosystem that have improved the process significantly. pankaj:~ pankaj$ node -vīefore starting some simple Node JS examples, we will discuss about Major Components of Node JS Platform in next post.Installing software on Windows in an automatable, repeatable and easy way in Windows has always been painful in the past. usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/bin:/usr/local/apache-maven-3.0.5/bin:īelow are some sample commands to check the version and start Node CLI and exit it. Usually it’s there by default but you can check it using below command. As you can see from above image, /usr/local/bin should be in the PATH variable. Node.js Base Environment Setup on Mac OS Xįor Mac OS X, download the pkg installer and run it. We can also use Ctrl D OR use Ctrl C Twice to exit from Node CLI. Exit from Node CLI: We can use “process.exit()” command to exit from Node CLI.Check Node JS Version: Use the following command to know your Node JS Version from Command prompt.Run “node.exe” command Now we are able to see “>” prompt, that means our Node JS Base Environment Setup is done.Open Command prompt at NODSJS_HOME or anywhere like D:\.If we use other formats or if these are missing in your system environment variables, please add the following variables to SYSTEM properties PATH=C:\Users\\AppData\Roaming\npm D:\NodeJS.V.0.12.0\ %PATH%.This installer will take care of everything. If we use Windows Installer like “node-v0.12.0-圆4.msi” or exe file then we doesn’t need to do anything to SYSTEM variables.Now onwards, we will refer the following names for easier discussion purpose NODSJS_HOME= D:\NodeJS.V.0.12.0 NODEJS_MODULES= D:\NodeJS.V.0.12.0\node_modules NODEJS_NPM= D:\NodeJS.V.0.12.0\node_modules\npm NOTE: Here we can observe node.exe and npm.cmd files and also “node_modules” folder. Open Node JS Platform Home in your Explorer.Choose Default values and click on “Install” Button. Choose your required location to install.Accept License Agreement and Click on “Next” Button. Please double click on “node-v0.12.0-圆4.msi” file to start Installation process.Please click on “INSTALL” button to download latest Node JS Platform Version 0.12.0, this is the latest version as of writing this post.If we want to select Node JS Platform based on our Hardware and Software requirements like Windows 32bit or 64bit OS, please click on “Downloads” button and select your required Node JS version to download. If we want to download latest stable version, we can click on this button. Access Node JS Official Website “ ” Here we can find “INSTALL” button.Node JS Base Environment Setup on Windows In this post, we will discuss about “ How to setup Node JS Base Environment” in Windows OS and Mac OS X. Now we have some idea about what is Node JS and what is not Node JS. In my previous post, we have discussed about “ Introduction to Node JS Platform”.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |