I was able to install nodejs version v10.7.0 and npm version 6.1.0 without any issues. Also installed angular 1.7.2 and typescript 2.9.2.I am getting this below error on trying to install npm install -g @angular/cli@latest.
I have tried all of the debug steps I could find online, including force clearing the cache and installing and uninstalling nodejs and adding my system32 folder to the PATH variable. Mostly followed this article I thought was very helpful - How do you install angular-cli for windows 7
7904 info lifecycle @schematics/[email protected]~postinstall: @schematics/[email protected]
7905 silly postinstall @schematics/[email protected]
7906 info lifecycle @schematics/[email protected]~postinstall: @schematics/[email protected]
7907 silly postinstall [email protected]
7908 info lifecycle [email protected]~postinstall: [email protected]
7909 silly postinstall [email protected]
7910 info lifecycle [email protected]~postinstall: [email protected]
7911 silly postinstall [email protected]
7912 info lifecycle [email protected]~postinstall: [email protected]
7913 silly postinstall [email protected]
7914 info lifecycle [email protected]~postinstall: [email protected]
7915 silly postinstall [email protected]
7916 info lifecycle [email protected]~postinstall: [email protected]
7917 silly postinstall @angular/[email protected]
7918 info lifecycle @angular/[email protected]~postinstall: @angular/[email protected]
7919 verbose lifecycle @angular/[email protected]~postinstall: unsafe-perm in lifecycle true
7920 verbose lifecycle @angular/[email protected]~postinstall: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Nidhin\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\.bin;C:\Users\Nidhin\AppData\Roaming\npm\node_modules\.bin;C:\Windows\System32;C:\Users\Nidhin\AppData\Local\Programs\Python\Python37\Scripts\;C:\Users\Nidhin\AppData\Local\Programs\Python\Python37\;C:\Users\Nidhin\AppData\Local\Programs\Fiddler;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\nodejs\;C:\Users\Nidhin\AppData\Roaming\npm;C:\Windows\System32;C:\Windows\System32;C:\Users\Nidhin\AppData\Local\Programs\Python\Python37\Scripts\;C:\Users\Nidhin\AppData\Local\Programs\Python\Python37\;C:\Users\Nidhin\AppData\Local\Programs\Fiddler;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\nodejs\;C:\Users\Nidhin\AppData\Roaming\npm;C:\Windows\System32;C:\WINDOWS/system32/WindowsPowerShell/v1.0
7921 verbose lifecycle @angular/[email protected]~postinstall: CWD: C:\Users\Nidhin\AppData\Roaming\npm\node_modules\@angular\cli
7922 silly lifecycle @angular/[email protected]~postinstall: Args: [ '/d /s /c', 'node ./bin/ng-update-message.js' ]
7923 info lifecycle @angular/[email protected]~postinstall: Failed to exec postinstall script
7924 silly lifecycle @angular/[email protected]~postinstall: Returned: code: -4058 signal: null
7925 info lifecycle @angular/[email protected]~postinstall: Failed to exec postinstall script
7926 timing action:postinstall Completed in 679ms
7927 verbose unlock done using C:\Users\Nidhin\AppData\Roaming\npm-cache\_locks\staging-2479c5e9a87c27dd.lock for C:\Users\Nidhin\AppData\Roaming\npm\node_modules\.staging
7928 warn rollback Rolling back [email protected] failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\Nidhin\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\define-property\node_modules'
7929 warn rollback Rolling back [email protected] failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\Nidhin\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\mixin-deep\node_modules'
7930 warn rollback Rolling back [email protected] failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\Nidhin\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\snapdragon-node\node_modules'
7931 warn rollback Rolling back [email protected] failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\Nidhin\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\to-object-path\node_modules'
7932 timing stage:rollbackFailedOptional Completed in 3584ms
7933 timing stage:runTopLevelLifecycles Completed in 135690ms
7934 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\@angular\cli\node_modules\fsevents):
7935 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
7936 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
7936 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
7936 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32
7936 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
7937 verbose stack Error: @angular/[email protected] postinstall: `node ./bin/ng-update-message.js`
7937 verbose stack spawn C:\Windows\System32\cmd.exe; ENOENT
7937 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:229:19)
7937 verbose stack at onErrorNT (internal/child_process.js:406:16)
7937 verbose stack at process._tickCallback (internal/process/next_tick.js:63:19)
7938 verbose pkgid @angular/[email protected]
7939 verbose cwd C:\WINDOWS\system32
7940 verbose Windows_NT 6.1.7601
7941 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "@angular/cli@latest"
7942 verbose node v10.7.0
7943 verbose npm v6.1.0
7944 error file C:\Windows\System32\cmd.exe;
7945 error path C:\Windows\System32\cmd.exe;
7946 error code ELIFECYCLE
7947 error errno ENOENT
7948 error syscall spawn C:\Windows\System32\cmd.exe;
7949 error @angular/[email protected] postinstall: `node ./bin/ng-update-message.js`
7949 error spawn C:\Windows\System32\cmd.exe; ENOENT
7950 error Failed at the @angular/[email protected] postinstall script.
7950 error This is probably not a problem with npm. There is likely additional logging output above.
7951 verbose exit [ 1, true ]