为什么节点给我这个错误?

时间:2017-04-22 22:14:04

标签: javascript json node.js npm

我一直试图制作我的第一个推特机器人,但是当我运行npm run dev时我得到了这个错误:

reduce

使用nodejs和npm命令连接我的代码有点新鲜。这是我的package.json和我的app.js文件:

package.json:

> Tweeter@1.0.0 dev /mnt/c/Users/rfasc/Dropbox/Hackathon/HackCuTwitter
> node app.js

npm ERR! weird error 1
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0 

和app.js:

{
  "name": "Tweeter",
  "version": "1.0.0",
  "description": "package.json tester",
  "main": "app.js",
  "dependencies": {
    "twitter": "^1.7.0",
    "twitter-stream-api": "^0.5.1"
  },
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "dev": "node app.js"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/kennychiwa/HackCuTwitter.git"
  },
  "author": "",
  "license": "BSD-2-Clause",
  "bugs": {
     "url": "https://github.com/kennychiwa/HackCuTwitter/issues"
  },
  "homepage": "https://github.com/kennychiwa/HackCuTwitter#readme"
}

请帮忙,谢谢。

1 个答案:

答案 0 :(得分:-1)

你可以尝试这个命令吗

sudo ln -s /usr/bin/nodejs /usr/bin/node