search

Home  >  Q&A  >  body text

javascript - npm install -g n error

In order to update nodejs install the n module, but the following error is reported. Why is this?

C:\Windows\System32>npm i -g n
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\node.exe" "C:\node_modules\npm\bin\npm-cli.js" "i" "-g"
n"
npm ERR! node v6.11.0
npm ERR! npm  v3.10.10
npm ERR! code EBADPLATFORM

npm ERR! notsup Unsupported platform for n@2.1.7: 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:\Windows\System32\npm-debug.log
怪我咯怪我咯2728 days ago1067

reply all(3)I'll reply

  • 迷茫

    迷茫2017-06-15 09:25:19

    You didn’t read the document carefully at first glance. The n module does not support Windows systems.
    https://www.npmjs.com/package/n
    Please read the content in brackets below the picture yourself.

    reply
    0
  • 学习ing

    学习ing2017-06-15 09:25:19

    npm -install xxx -g // "xxx" represents the module you want to install

    reply
    0
  • 欧阳克

    欧阳克2017-06-15 09:25:19

    nGenerally refers to the module you want to download, such as jquery

    reply
    0
  • Cancelreply