{
"name": "package.js",
"version": "1.0.0",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "babel-watch server.js"
},
"dependencies": {
"babel-core": "^6.26.3",
"expo": "^26.0.0",
"react": "16.3.0-alpha.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-26.0.0.tar.gz"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-preset-react": "^6.24.1",
"babel-watch": "^2.0.7"
},
"depencies": {
"apollo-server-express": "^1.3.2",
"express": "^4.16.2",
"graphql": "^0.13.0",
"graphql-tools": "^2.20.2"
}
}
Ошибка, которая отображается после выполнения npm run dev. Журнал ошибок размещен ниже. Я довольно новичок в GraphQL, Apollo и Angular.
20 error code ELIFECYCLE
21 error errno 1
22 error backend@1.0.0 dev: `babel-watch server.js`
22 error Exit status 1
23 error Failed at the backend@1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Если мне не хватает других файлов, не стесняйтесь спрашивать в комментариях.
Server.Js
import express from 'express';
import bodyParser from 'body-parser';
import { graphqlExpress } from 'apollo-server-express';
const app = express();
app.get('/', (req, res) => res.send('Hello World'));
app.listen(4000, () => console.log('Express server running on port 4000'));