title: Setup angular CLI in AWS
body: <p>Trying to setup devleopment enviornment in EC2 Cent OS, facing issues in installing Angular CLI.</p>
  
  <p>Installed node js using :</p>
  
  <pre><code>curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
  . ~/.nvm/nvm.sh
  nvm install 9.3.0
  
  [root@ip ~]# node -v
  v9.3.0
  [root@ip ~]# npm -v
  5.6.0
  </code></pre>
  
  <p>While trying to install angular-cli :</p>
  
  <pre><code>[root@ip ~]# npm install  @angular/cli
  
  &gt; node-sass@4.7.2 install /root/node_modules/node-sass
  &gt; node scripts/install.js
  
  sh: node: command not found
  
  &gt; uglifyjs-webpack-plugin@0.4.6 postinstall /root/node_modules/@angular/cli/node                                                                                        _modules/webpack/node_modules/uglifyjs-webpack-plugin
  &gt; node lib/post_install.js
  
  sh: node: command not found
  npm WARN enoent ENOENT: no such file or directory, open '/root/package.json'
  npm WARN license-webpack-plugin@1.1.1 requires a peer of webpack-sources@&gt;=1.0.0                                                                                         but none is installed. You must install peer dependencies yourself.
  npm WARN root No description
  npm WARN root No repository field.
  npm WARN root No README data
  npm WARN root No license field.
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fse                                                                                        vents):
  npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@                                                                                        1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}                                                                                        )
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.7.2 (node_modules/no                                                                                        de-sass):
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.7.2 install: `node s                                                                                        cripts/install.js`
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn ENOENT
  
  npm ERR! file sh
  npm ERR! code ELIFECYCLE
  npm ERR! errno ENOENT
  npm ERR! syscall spawn
  npm ERR! uglifyjs-webpack-plugin@0.4.6 postinstall: `node lib/post_install.js`
  npm ERR! spawn ENOENT
  npm ERR!
  npm ERR! Failed at the uglifyjs-webpack-plugin@0.4.6 postinstall script.
  npm ERR! This is probably not a problem with npm. There is likely additional log                                                                                        ging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /root/.npm/_logs/2018-02-11T05_17_45_238Z-debug.log
  </code></pre>
  
  <p>Tried , -f option :</p>
  
  <pre><code>[root@ip ~]# npm install -g -f angular-cli
  
  npm WARN using --force I sure hope you know what you are doing.
  npm WARN deprecated angular-cli@1.0.0-beta.28.3: angular-cli has been renamed to @angular/cli. Please update your dependencies.
  npm WARN deprecated gulp-util@3.0.7: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
  npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
  /root/.nvm/versions/node/v9.3.0/bin/ng -&gt; /root/.nvm/versions/node/v9.3.0/lib/node_modules/angular-cli/bin/ng
  
  &gt; fsevents@1.1.3 install /root/.nvm/versions/node/v9.3.0/lib/node_modules/angular-cli/node_modules/fsevents
  &gt; node install
  
  sh: node: command not found
  
  &gt; node-sass@4.7.2 install /root/.nvm/versions/node/v9.3.0/lib/node_modules/angular-cli/node_modules/node-sass
  &gt; node scripts/install.js
  
  sh: node: command not found
  
  &gt; node-sass@4.7.2 postinstall /root/.nvm/versions/node/v9.3.0/lib/node_modules/angular-cli/node_modules/node-sass
  &gt; node scripts/build.js
  
  sh: node: command not found
  npm WARN @angular/core@2.4.10 requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself.
  
  + angular-cli@1.0.0-beta.28.3
  added 917 packages in 21.658s
  </code></pre>
  
  <p>After installing the beta version , executing ng serve command inside the angular project code  shows : </p>
  
  <pre><code>As a forewarning, we are moving the CLI npm package to "@angular/cli" with the next release,
  which will only support Node 6.9 and greater. This package will be officially deprecated
  shortly after.
  
  To disable this warning use "ng set --global warnings.packageDeprecation=false".
  
  You have to be inside an angular-cli project in order to use the serve command.
  </code></pre>
  
  <p>Any ideas on the above ?
  OS : CentOS 7
  Arch : 64bit
  Host : AWS</p>