npm开始在Windows机器上失败,但在ubuntu上工作

时间:2017-08-08 16:24:58

标签: node.js npm graphql npm-start

我正在学习本教程https://edgecoders.com/graphql-learn-by-doing-part-1-of-3-9b04cadeacfa,以了解GraphQL的基础知识。在我尝试运行此命令npm start之后跟踪整个过程后,它在Windows上失败但是同样的命令在我的linux机器上运行。任何人都可以在这里指出我在这里缺少的东西吗?错误是

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules
\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! github-graphql-server@1.0.0 start: `babel-node --presets es2015 ./server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the github-graphql-server@1.0.0 start script 'babel-node --presets es2015 ./server.js
'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the github-graphql-server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     babel-node --presets es2015 ./server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs github-graphql-server
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls github-graphql-server
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     F:\my\github-graphql-server\npm-debug.log

我认为这两个可以解决我的问题,博客评论也表明了这一点 清理智能引号并使用超量而不是破折号。

  

npm ERR!告诉作者你的系统失败了:

     

npm ERR! babel-node --presets es2015 ./server.js

我的 package.json

上的简化文件
 "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "./node_modules/.bin/babel-node --presets es2015 ./server.js"
  },   

package.json

的其他依赖项
 "dependencies": {
    "babel-cli": "^6.24.1",
    "babel-core": "^6.25.0",
    "babel-loader": "^7.1.1",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-es2015-node": "^6.1.1",
    "express": "^4.15.4",
    "express-graphql": "^0.6.7",
    "graphql": "^0.10.5"
  }

0 个答案:

没有答案