I am trying to install angular 5 in my pc. Everything installed correctly,but when I use 'ng-serve' command to run my application it shows following error.
You are running version v8.7.0 of Node.js, which is not supported by Angular CLI v6.
The official Node.js version that is supported is 8.9 and greater.
Please visit https://nodejs.org/en/ to find instructions on how to update Node.js.
current version of node.js is '8.7.0' and npm is '6.0.0'.
After a lot of search I followed below steps to update my node.js on windows 10
npm cache clean -f
npm install -g n
n latest
but I failed to use this commands,it shows following error
C:\WINDOWS\system32>npm cache clean -f
npm WARN using --force I sure hope you know what you are doing.
C:\WINDOWS\system32>npm install -g n
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for n@2.1.8: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS: !win32
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HP\AppData\Roaming\npm-cache\_logs\2018-05-06T07_36_10_847Z-debug.log
how can I update node.js to latest version inorder to run my angular5 application?