Skip to content

Environment Setup

Michael O'Sullivan edited this page Nov 10, 2017 · 8 revisions

Environment Setup

Windows

  1. Install NodeJS on your local machine. Node version here: Node Package

  2. Make sure that your global node modules, and node binaries are in your PATH:

    • Right click on Computer (My PC in Win10), and select Properties to open the System window.
    • On the side panel of the System window click Advanced System Settings to open System Properties.
    • On the advanced tab of System Properties click Environment Variables.
    • Find your Path variable, click edit, and add the npm bin folder.
      For the Node version, that path is as follows:
      C:\Users\cmurphy\AppData\Roaming\npm
      

    Replace cmurphy with your username. You may need to restart your console for your path changes to take effect.

  3. Install globally the Gulp CLI package

    $ npm i -g gulp-cli
    

Linux

  1. To get things rolling:
    $ sudo apt-get install nodejs npm

    If you need to manage multiple node versions at the same time, check out nvm.

  2. Install globally the Gulp CLI package

    $ npm i -g gulp-cli
    

Create a fresh Angularjs 4.0 project

Windows

  1. Install & Run a local instance(s) of the Website:

    npm install -g @angular/cli
    ng new TestApp
    cd TestApp
    ng serve
    
  2. Go to http://localhost:4200/ with your browser and ensure that you have accepted the certificate that it is asking for.

  3. Now if you have a look at the source code of the default application, you can see that you have a index.html page where you have loaded the app-root component. By default the application has only the app-root component which is defined inside the src/app folder.

Linux

  1. Install & Run a local instance(s) of the Website:

    npm install -g @angular/cli
    ng new TestApp
    cd TestApp
    ng serve
    
  2. Go to http://localhost:4200/ with your browser and ensure that you have accepted the certificate that it is asking for.

  3. Now if you have a look at the source code of the default application, you can see that you have a index.html page where you have the loaded the app-root component. By default the application has only the app-root component which is defined inside the src/app folder.

Issue with nodejs

https://nodejs.org/en/download/package-manager/