SlideShare a Scribd company logo
1 of 12
Download to read offline
Setup Node and 
npm 
Rick Chang
Install Node for 
Development 
Mac OS X with Homebrew 
brew search node 
brew install node 
Ubuntu from package manager 
sudo apt-get install nodejs npm 
CentOS from package manager 
yum install nodejs npm
Install Node for 
Development 
Node.js on Microsoft Windows with Chocolatey Gallery[1] 
Powershell and .NET framework 4.0 in Windows machine 
Install Chocolatey Gallery 
@powershell -NoProfile -ExecutionPolicy unrestricted -Command 
"iex ((new-object net.webclient).DownloadString('https:// 
chocolatey.org/install.ps1'))" && SET PATH=%PATH%; 
%ALLUSERSPROFILE%chocolateybin 
Install Node.js and NPM 
choco install nodejs
Node commands 
Check node version 
node --version 
Check Google V8 and OpenSSL version 
node -e "console.log(process.versions)" 
!
Node Version Manager 
Mac OS X, Linux-based OS 
nvm 
Microsoft Windows 
nodist
nvm 
Setup nvm 
npm install -g nvm 
Install node version 
npm install 0.10.29 
Use the specific node version 
npm use 0.10.29 
Disable node version 
npm deactivate
nodist 
Setup nodist 
cinst nodist -Pre 
Install node version[2][3] 
nodist add 0.10.29 
Use the specific node version 
nodist 0.10.29
Install Native module on 
Windows 
Some Node modules are written with C 
or C++, meaning they must be compiled 
to native code 
This is handled automatically by npm and 
it will use node-gyp to compile to native 
code, and to do so node-gyp depends on 
a compiler toolchain that includes Python 
2.7 and a C/C++ compiler. 
Reference: https://github.com/TooTallNate/node-gyp#installation
Install Native module on 
Windows 7 
Install Python 2.7 
choco install python2 
Install Microsoft Visual Studio 2010 Express 
Download Link 
Install node-gyp 
npm install -g node-gyp
Node Package Manager 
Install package in global scope 
npm install -g express 
Install package in local scope 
npm install underscore
Start Node in system 
startup 
forever package 
Install forever 
npm install -g forever
Reference 
[1]Chocolatey Gallery, http:// 
chocolatey.org/ 
[2]Nodist – Node version manager for 
Windows, http://thechangelog.com/nodist-node- 
version-manager-for-windows/ 
[3]nodist, https://github.com/marcelklehr/ 
nodist#readme

More Related Content

What's hot

Docker session II: Introduction to Docker
Docker session II: Introduction to DockerDocker session II: Introduction to Docker
Docker session II: Introduction to DockerDegendra Sivakoti
 
Docker session I: Continuous integration, delivery and deployment
Docker session I: Continuous integration, delivery and deploymentDocker session I: Continuous integration, delivery and deployment
Docker session I: Continuous integration, delivery and deploymentDegendra Sivakoti
 
Helpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and DjangoHelpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and Djangoroskakori
 
Advanced microservices with .Net
Advanced microservices with .NetAdvanced microservices with .Net
Advanced microservices with .NetDon Schenck
 
Django deployment and rpm+yum
Django deployment and rpm+yumDjango deployment and rpm+yum
Django deployment and rpm+yumWalter Liu
 
Docker and fig for dev
Docker and fig for devDocker and fig for dev
Docker and fig for devpranas_algoteq
 
Python+anaconda Development Environment
Python+anaconda Development EnvironmentPython+anaconda Development Environment
Python+anaconda Development EnvironmentKwangyoun Jung
 
Installing nagios core_from_source
Installing nagios core_from_sourceInstalling nagios core_from_source
Installing nagios core_from_sourcelaonap166
 
Docker deploy
Docker deployDocker deploy
Docker deployEric Ahn
 
OSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopOSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopleffen
 
Grunt - The JavaScript Task Runner
Grunt - The JavaScript Task RunnerGrunt - The JavaScript Task Runner
Grunt - The JavaScript Task RunnerMohammed Arif
 
Node js packages [#howto with npm]
Node js packages [#howto with npm]Node js packages [#howto with npm]
Node js packages [#howto with npm]Andrii Lundiak
 
TDC2018SP | Trilha Containers - CI/CD com Docker e Drone
TDC2018SP | Trilha Containers - CI/CD com Docker e DroneTDC2018SP | Trilha Containers - CI/CD com Docker e Drone
TDC2018SP | Trilha Containers - CI/CD com Docker e Dronetdc-globalcode
 
5 min docker
5 min docker5 min docker
5 min dockerSimon Su
 
2016/12/10: Ourense MakersLab workshop
2016/12/10: Ourense MakersLab workshop2016/12/10: Ourense MakersLab workshop
2016/12/10: Ourense MakersLab workshopJesusArroyoTorrens
 
Plone deployment made easy
Plone deployment made easyPlone deployment made easy
Plone deployment made easyKim Chee Leong
 

What's hot (20)

Docker session II: Introduction to Docker
Docker session II: Introduction to DockerDocker session II: Introduction to Docker
Docker session II: Introduction to Docker
 
Docker session I: Continuous integration, delivery and deployment
Docker session I: Continuous integration, delivery and deploymentDocker session I: Continuous integration, delivery and deployment
Docker session I: Continuous integration, delivery and deployment
 
Helpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and DjangoHelpful pre commit hooks for Python and Django
Helpful pre commit hooks for Python and Django
 
Advanced microservices with .Net
Advanced microservices with .NetAdvanced microservices with .Net
Advanced microservices with .Net
 
Django deployment and rpm+yum
Django deployment and rpm+yumDjango deployment and rpm+yum
Django deployment and rpm+yum
 
Docker and fig for dev
Docker and fig for devDocker and fig for dev
Docker and fig for dev
 
Ferrara Linux Day 2011
Ferrara Linux Day 2011Ferrara Linux Day 2011
Ferrara Linux Day 2011
 
Docker 101 & Workshop
Docker 101 & WorkshopDocker 101 & Workshop
Docker 101 & Workshop
 
Python+anaconda Development Environment
Python+anaconda Development EnvironmentPython+anaconda Development Environment
Python+anaconda Development Environment
 
Installing nagios core_from_source
Installing nagios core_from_sourceInstalling nagios core_from_source
Installing nagios core_from_source
 
Docker deploy
Docker deployDocker deploy
Docker deploy
 
OSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopOSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshop
 
Grunt - The JavaScript Task Runner
Grunt - The JavaScript Task RunnerGrunt - The JavaScript Task Runner
Grunt - The JavaScript Task Runner
 
Node js packages [#howto with npm]
Node js packages [#howto with npm]Node js packages [#howto with npm]
Node js packages [#howto with npm]
 
TDC2018SP | Trilha Containers - CI/CD com Docker e Drone
TDC2018SP | Trilha Containers - CI/CD com Docker e DroneTDC2018SP | Trilha Containers - CI/CD com Docker e Drone
TDC2018SP | Trilha Containers - CI/CD com Docker e Drone
 
5 min docker
5 min docker5 min docker
5 min docker
 
2016/11/05: OSWDem16 workshop
2016/11/05: OSWDem16 workshop2016/11/05: OSWDem16 workshop
2016/11/05: OSWDem16 workshop
 
2016/12/10: Ourense MakersLab workshop
2016/12/10: Ourense MakersLab workshop2016/12/10: Ourense MakersLab workshop
2016/12/10: Ourense MakersLab workshop
 
Grunt to automate JS build
Grunt to automate JS buildGrunt to automate JS build
Grunt to automate JS build
 
Plone deployment made easy
Plone deployment made easyPlone deployment made easy
Plone deployment made easy
 

Similar to Ch2.setup.node.and.npm

React native on windows
React native on windowsReact native on windows
React native on windowsAbdul Karim
 
Node.js/io.js Native C++ Addons
Node.js/io.js Native C++ AddonsNode.js/io.js Native C++ Addons
Node.js/io.js Native C++ AddonsChris Barber
 
How to Install Node.js and NPM on Windows and Mac?
How to Install Node.js and NPM on Windows and Mac?How to Install Node.js and NPM on Windows and Mac?
How to Install Node.js and NPM on Windows and Mac?Inexture Solutions
 
3 Things Everyone Knows About Node JS That You Don't
3 Things Everyone Knows About Node JS That You Don't3 Things Everyone Knows About Node JS That You Don't
3 Things Everyone Knows About Node JS That You Don'tF5 Buddy
 
Improving WordPress Theme Development Workflow - Naveen Kharwar.
Improving WordPress Theme Development Workflow - Naveen Kharwar.Improving WordPress Theme Development Workflow - Naveen Kharwar.
Improving WordPress Theme Development Workflow - Naveen Kharwar.Naveen Kharwar
 
Introduction to NodeJS JSX is an extended Javascript based language used by R...
Introduction to NodeJS JSX is an extended Javascript based language used by R...Introduction to NodeJS JSX is an extended Javascript based language used by R...
Introduction to NodeJS JSX is an extended Javascript based language used by R...JEEVANANTHAMG6
 
Mastering node.js, part 1 - introduction
Mastering node.js, part 1 - introductionMastering node.js, part 1 - introduction
Mastering node.js, part 1 - introductioncNguyn826690
 
Lezione 02 React and React Native installation and Configuration
Lezione 02   React and  React Native installation and ConfigurationLezione 02   React and  React Native installation and Configuration
Lezione 02 React and React Native installation and ConfigurationUniversity of Catania
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed AssafAhmed Assaf
 
OpenShift 5 Drop5 demo
OpenShift 5 Drop5 demoOpenShift 5 Drop5 demo
OpenShift 5 Drop5 demoGlenn West
 
Node js training (1)
Node js training (1)Node js training (1)
Node js training (1)Ashish Gupta
 
Mobile app with cordova
Mobile app with cordovaMobile app with cordova
Mobile app with cordovaCandice Zhuang
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandTroublemaker Khunpech
 
DevNet Associate : Python introduction
DevNet Associate : Python introductionDevNet Associate : Python introduction
DevNet Associate : Python introductionJoel W. King
 
Coffeescript installation
Coffeescript installationCoffeescript installation
Coffeescript installationIndies Services
 
How to Install Odoo 17 on Ubuntu.pdf
How to Install Odoo 17 on Ubuntu.pdfHow to Install Odoo 17 on Ubuntu.pdf
How to Install Odoo 17 on Ubuntu.pdfCanditRoot
 

Similar to Ch2.setup.node.and.npm (20)

React native on windows
React native on windowsReact native on windows
React native on windows
 
Node.js/io.js Native C++ Addons
Node.js/io.js Native C++ AddonsNode.js/io.js Native C++ Addons
Node.js/io.js Native C++ Addons
 
How to Install Node.js and NPM on Windows and Mac?
How to Install Node.js and NPM on Windows and Mac?How to Install Node.js and NPM on Windows and Mac?
How to Install Node.js and NPM on Windows and Mac?
 
Solidity intro
Solidity introSolidity intro
Solidity intro
 
Node.js
Node.jsNode.js
Node.js
 
3 Things Everyone Knows About Node JS That You Don't
3 Things Everyone Knows About Node JS That You Don't3 Things Everyone Knows About Node JS That You Don't
3 Things Everyone Knows About Node JS That You Don't
 
Improving WordPress Theme Development Workflow - Naveen Kharwar.
Improving WordPress Theme Development Workflow - Naveen Kharwar.Improving WordPress Theme Development Workflow - Naveen Kharwar.
Improving WordPress Theme Development Workflow - Naveen Kharwar.
 
Introduction to NodeJS JSX is an extended Javascript based language used by R...
Introduction to NodeJS JSX is an extended Javascript based language used by R...Introduction to NodeJS JSX is an extended Javascript based language used by R...
Introduction to NodeJS JSX is an extended Javascript based language used by R...
 
Mastering node.js, part 1 - introduction
Mastering node.js, part 1 - introductionMastering node.js, part 1 - introduction
Mastering node.js, part 1 - introduction
 
Native Hadoop with prebuilt spark
Native Hadoop with prebuilt sparkNative Hadoop with prebuilt spark
Native Hadoop with prebuilt spark
 
Lezione 02 React and React Native installation and Configuration
Lezione 02   React and  React Native installation and ConfigurationLezione 02   React and  React Native installation and Configuration
Lezione 02 React and React Native installation and Configuration
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed Assaf
 
OpenShift 5 Drop5 demo
OpenShift 5 Drop5 demoOpenShift 5 Drop5 demo
OpenShift 5 Drop5 demo
 
Node js training (1)
Node js training (1)Node js training (1)
Node js training (1)
 
Mobile app with cordova
Mobile app with cordovaMobile app with cordova
Mobile app with cordova
 
Mobile app with cordova
Mobile app with cordovaMobile app with cordova
Mobile app with cordova
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
DevNet Associate : Python introduction
DevNet Associate : Python introductionDevNet Associate : Python introduction
DevNet Associate : Python introduction
 
Coffeescript installation
Coffeescript installationCoffeescript installation
Coffeescript installation
 
How to Install Odoo 17 on Ubuntu.pdf
How to Install Odoo 17 on Ubuntu.pdfHow to Install Odoo 17 on Ubuntu.pdf
How to Install Odoo 17 on Ubuntu.pdf
 

Recently uploaded

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Ch2.setup.node.and.npm

  • 1. Setup Node and npm Rick Chang
  • 2. Install Node for Development Mac OS X with Homebrew brew search node brew install node Ubuntu from package manager sudo apt-get install nodejs npm CentOS from package manager yum install nodejs npm
  • 3. Install Node for Development Node.js on Microsoft Windows with Chocolatey Gallery[1] Powershell and .NET framework 4.0 in Windows machine Install Chocolatey Gallery @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https:// chocolatey.org/install.ps1'))" && SET PATH=%PATH%; %ALLUSERSPROFILE%chocolateybin Install Node.js and NPM choco install nodejs
  • 4. Node commands Check node version node --version Check Google V8 and OpenSSL version node -e "console.log(process.versions)" !
  • 5. Node Version Manager Mac OS X, Linux-based OS nvm Microsoft Windows nodist
  • 6. nvm Setup nvm npm install -g nvm Install node version npm install 0.10.29 Use the specific node version npm use 0.10.29 Disable node version npm deactivate
  • 7. nodist Setup nodist cinst nodist -Pre Install node version[2][3] nodist add 0.10.29 Use the specific node version nodist 0.10.29
  • 8. Install Native module on Windows Some Node modules are written with C or C++, meaning they must be compiled to native code This is handled automatically by npm and it will use node-gyp to compile to native code, and to do so node-gyp depends on a compiler toolchain that includes Python 2.7 and a C/C++ compiler. Reference: https://github.com/TooTallNate/node-gyp#installation
  • 9. Install Native module on Windows 7 Install Python 2.7 choco install python2 Install Microsoft Visual Studio 2010 Express Download Link Install node-gyp npm install -g node-gyp
  • 10. Node Package Manager Install package in global scope npm install -g express Install package in local scope npm install underscore
  • 11. Start Node in system startup forever package Install forever npm install -g forever
  • 12. Reference [1]Chocolatey Gallery, http:// chocolatey.org/ [2]Nodist – Node version manager for Windows, http://thechangelog.com/nodist-node- version-manager-for-windows/ [3]nodist, https://github.com/marcelklehr/ nodist#readme