SyntaxError: Unexpected token ...
Created by: Tirokk
Authored by dineshlt Closed
HI
I have successfully installed Nitro-Backend package using the below guide
https://docs.human-connection.org/nitro/backend/installation
If I start nitro backend using this command npm run start am getting the below issue
> human-connection-backend@0.0.1 start /home/android/Human Connection/Nitro-Backend
> node dist/
/home/android/Human Connection/Nitro-Backend/dist/graphql-schema.js:28
Query: { ..._statistics.default.Query,
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:533:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/android/Human Connection/Nitro-Backend/dist/server.js:12:22)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! human-connection-backend@0.0.1 start: `node dist/`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the human-connection-backend@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/android/.npm/_logs/2019-03-28T11_45_14_468Z-debug.log
I am getting the issue for graphql-schema.js file. so I have installed neo4j Desktop and configured using that same guide.
Successfully installed and ran this local server http://localhost:7474/browser/ and also created Indices in Neo4j by using the below commands.
$ CALL db.index.fulltext.createNodeIndex("full_text_search",["Post"],["title", "content"]);
But I can't able to Seed Database with Data
If I run this command npm run db:seed I am getting the below syntax error
> human-connection-backend@0.0.1 db:seed /home/android/Human Connection/Nitro-Backend
> $npm_package_config_no_auth run-p --race dev db:script:seed
> human-connection-backend@0.0.1 dev /home/android/Human Connection/Nitro-Backend
> nodemon --exec babel-node src/ -e js,graphql
> human-connection-backend@0.0.1 db:script:seed /home/android/Human Connection/Nitro-Backend
> wait-on tcp:4001 && babel-node src/seed/seed-db.js
[nodemon] 1.18.10
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `babel-node src/`
/home/android/Human Connection/Nitro-Backend/src/graphql-schema.js:28
Query: { ..._statistics.default.Query,
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:533:28)
at Module._compile (/home/android/Human Connection/Nitro-Backend/node_modules/pirates/lib/index.js:99:24)
at Module._extensions..js (module.js:580:10)
at Object.newLoader [as .js] (/home/android/Human Connection/Nitro-Backend/node_modules/pirates/lib/index.js:104:7)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
[nodemon] app crashed - waiting for file changes before starting...
Kindly give any needfull suggestion.