使用node.js安装高速公路

时间:2016-07-16 01:50:50

标签: node.js npm autobahn

我是nodejs的新手,希望在Ubuntu 16.04上运行一些简单的代码。

我已经安装了nodejs和npm

root@coding:~# node -v
v6.3.0
root@coding:~# npm -v
3.10.3

我现在正在寻找按照以下方式安装高速公路: http://autobahn.ws/js/gettingstarted.html

不幸的是我得到了:

root@coding:~# npm install autobahn

> bufferutil@1.2.1 install /root/node_modules/bufferutil
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory '/root/node_modules/bufferutil/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  COPY Release/bufferutil.node
make: Leaving directory '/root/node_modules/bufferutil/build'

> utf-8-validate@1.2.1 install /root/node_modules/utf-8-validate
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory '/root/node_modules/utf-8-validate/build'
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  COPY Release/validation.node
make: Leaving directory '/root/node_modules/utf-8-validate/build'
/root
└─┬ autobahn@0.10.1 
  ├─┬ bufferutil@1.2.1 
  │ ├── bindings@1.2.1 
  │ └── nan@2.4.0 
  ├── crypto-js@3.1.6 
  ├─┬ msgpack-lite@0.1.20 
  │ ├── event-lite@0.1.1 
  │ ├── ieee754@1.1.6 
  │ ├── int64-buffer@0.1.9 
  │ └── isarray@1.0.0 
  ├── utf-8-validate@1.2.1 
  ├── when@3.7.7 
  └─┬ ws@1.1.1 
    ├── options@0.0.6 
    └── ultron@1.0.2 

npm WARN enoent ENOENT: no such file or directory, open '/root/package.json'
npm WARN root No description
npm WARN root No repository field.
npm WARN root No README data
npm WARN root No license field.

1 个答案:

答案 0 :(得分:2)

警告-1:

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR

原因:你的npm或autobahn的一个依赖项是使用不推荐使用的库或函数,在这种情况下是NVM_NODEJS_ORG_MIRROR。如果您的npm已经达到最新状态,请不要担心autobahn的人会解决它。如果你愿意,可以提出问题。

警告-2:

npm WARN enoent ENOENT: no such file or directory, open '/root/package.json'
npm WARN root No description
npm WARN root No repository field.
npm WARN root No README data
npm WARN root No license field.

原因:您没有package.json。只需运行npm init并按照说明操作即可为您创建一个。

<强>结论:

无论哪种方式都警告。检查您的node_modules\文件夹,并且最有可能安装所有内容,因为没有列出错误。