Ryanair Yang
Ryanair Yang

Reputation: 1

When I install the node.js, it gives me some errors.And install failed

C:\Users\ASUS>npm install -g n
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ASUS\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "n"
npm ERR! node v6.10.0
npm ERR! npm  v4.3.0
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported platform for [email protected]: 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! Please include the following file with any support request:
npm ERR!     C:\Users\ASUS\AppData\Roaming\npm-cache\_logs\2017-03-07T11_09_13_826Z-debug.log

This is the error, I don't know how to fix it.

Upvotes: 0

Views: 98

Answers (2)

Joe Clay
Joe Clay

Reputation: 35837

Looking at the README for the library you're trying to install (which you should always, always do!):

(Unfortunately n is not supported on Windows yet. If you're able to make it work, send in a pull request!)

And sure enough, that's what the error message is telling you:

Unsupported platform for [email protected]: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"})

It's saying that the package wanted to be installed on a !win32 platform (in other words, not Windows), but your current platform doesn't meet that requirement.

Upvotes: 3

robertklep
robertklep

Reputation: 203534

The package n that you're trying to install doesn't have Windows support (as mentioned in the README).

Upvotes: 1

Related Questions