我尝试使用putty安装npm时出错

时间:2015-06-06 13:47:44

标签: amazon-ec2 npm install runtime-error

这是我尝试执行此命令时得到的结果(第3个命令 - 在ec2亚马逊中)

The next step is to install NPM(Node package manager). Type the following commands:

1. git clone https://github.com/isaacs/npm.git
2. cd npm
**3. sudo make install**

这是我得到的错误:

[ec2-user@ip-172-31-44-20 npm]$ sudo make install
scripts/doc-build.sh doc/api/npm-view.md man/man3/npm-view.3
make[1]: Entering directory `/home/ec2-user/npm'
node cli.js install marked-man --no-global

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
TypeError: Object #<Object> has no method 'tmpDir'
    at /home/ec2-user/npm/node_modules/osenv/osenv.js:49:13
    at Object.tmpdir (/home/ec2-user/npm/node_modules/osenv/osenv.js:14:15)
    at Object.<anonymous> (/home/ec2-user/npm/lib/config/defaults.js:76:18)
    at Module._compile (module.js:432:26)
    at Object..js (module.js:450:10)
    at Module.load (module.js:351:31)
    at Function._load (module.js:310:12)
    at Module.require (module.js:357:17)
    at require (module.js:368:17)
    at Object.<anonymous> (/home/ec2-user/npm/lib/config/core.js:4:18)
make[1]: *** [node_modules/.bin/marked-man] Error 1
make[1]: Leaving directory `/home/ec2-user/npm'
make: *** [man/man3/npm-view.3] Error 2

1 个答案:

答案 0 :(得分:0)

您必须安装受支持的node.js版本(0.10或0.12),您可以下载here或使用NVM

相关问题