zoukankan      html  css  js  c++  java
  • Windows 下Npm和NodeJS升级

    前提电脑中已经安装过NodeJS, npm。现在需要进行升级操作。

    1、查看当前的npm和NodeJs的版本:

    C:UsersAdministrator>node -v
    v4.4.3


    C:UsersAdministrator>npm -version
    2.15.1

    2、升级npm:

    C:UsersAdministrator>npm install npm -g
    C:Program Files odejs ode_global pm -> C:Program Files odejs ode_global
    ode_modules pmin pm-cli.js
    npm@4.5.0 C:Program Files odejs ode_global ode_modules pm


    C:UsersAdministrator>npm -version
    4.5.0

    3、安装全局n模块:

    C:UsersAdministrator>npm install -g n
    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! A complete log of this run can be found in:
    npm ERR!     C:Program Files odejs ode_cache\_logs2017-05-02T02_08_33_861Z-d
    ebug.log

    报错哦,那执行下面的命令:

    C:UsersAdministrator>npm install -g n --force
    npm WARN using --force I sure hope you know what you are doing.
    C:Program Files odejs ode_global -> C:Program Files odejs ode_global od
    e_modules in
    C:Program Files odejs ode_global
    `-- n@2.1.7

    4、升级NodeJs到最新版本:

    升级到最新稳定版本:

    n stable

    升级到最新版本:

    n latest

    升级到指定版本:

    n 0.10.26


    ---------------------
    作者:doitplayer
    来源:CSDN
    原文:https://blog.csdn.net/DoitPlayer/article/details/71077333
    版权声明:本文为博主原创文章,转载请附上博文链接!

  • 相关阅读:
    [Objective-C语言教程]决策结构(10)
    [Objective-C语言教程]循环语句(9)
    [Objective-C语言教程]关系运算符(8)
    [Objective-C语言教程]常量(7)
    [Objective-C语言教程]变量(6)
    [Objective-C语言教程]数据类型(5)
    转 Apache Ant 实现自动化部署
    转 智能化运维最佳实践-自动化
    ANT 操控 ORACLE数据库实践
    转: Ant 脚本的结构化设计
  • 原文地址:https://www.cnblogs.com/furenjian/p/9848311.html
Copyright © 2011-2022 走看看