grand-stack / grand-stack-starter

Simple starter project for GRANDstack full stack apps

Home Page:https://grandstack.io/docs/getting-started-grand-stack-starter.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

seedDb command not working with remote database

ed42311 opened this issue · comments

@KavitaKirdkude

I am also facing the issue with seedDb command.

I have followed the GrandStack starter project to create my first GrandStack application. I have created the Neo4J sandbox with the blank database and added the respective information into the .env file.

When I try to run the command npm run seedDb in a separate terminal within the "api" folder, the command fails and the Database is not seeded. The error I am receiving is -

Error: Error: Network error: Unexpected end of JSON input at C:\Kavita\GrandStackProjects\networkManagementApp\api\src\seed\/seed-db.js:36:17 at processTicksAndRejections (internal/process/task_queues.js:97:5) at async Promise.all (index 0)

I have verified that the mutations that I am getting from the method getSeedMutations() is a valid JSON.

I am unable to find any solution for the same. Is anyone facing similar issue and found any solution?

Unable to reproduce this error but let me break down the steps that you went through and you may clarify if I'm off base here so we can work on repro

  1. Neo4j blank sandbox created on https://sandbox.neo4j.com/
  2. signin and bolt uri information added to .env in ./api
  3. Start local server running, i.e. npm start in ./<project_dir>
  4. run npm run seedDb inside ./api in another terminal

@ed42311
That's right, you mentioned the right steps. I suspect this could be the issue of the Node JS or npm on my machine. I did reinstall both but that too didn't help. However, when I followed the same steps on another machine I could successfully run the Grandstack-Starter project.

On the laptop where it fails, I am using below versions -

  1. Node - v12.18.2
  2. npm - 6.14.6
  3. JDK - 11
  4. JRE - 1.8.0_261
  5. Windows 10 Pro

@KavitaKirdkude 🙏 many thanks for the feedback and the new information. Glad you got things working on another box, I'll put this on the list to run with your recorded environment settings. It would be useful to know what the issue is, especially if that's your primary machine or if someone else runs into this error.

@ed42311 Yes, it's my primary machine where it fails and the root cause of the issue is still unclear. FYI - the environmental settings on my both machines are exact same except the Windows OS. My primary machine has Windows 10 Pro while the other one (where things are working) has Windows 10 Home. I don't think the OS should matter in this case. In case I could figure out the issue, will surely update the details here. Thanks a lot.