Reaction-next-starterkit


#1

problem in running reaction-next-starterkit throwing the following error when run with docker-compose up command.

WAIT Compiling…10:13:32
web_1 |
web_1 | [Network error]: FetchError: request to http://devserver.reaction-api:3030/graphql-alpha failed, reason: getaddrinfo ENOTFOUND devserver.reaction-api devserver.reaction-api:3030
web_1 | Error while running getDataFromTree { Error: Network error: request to http://devserver.reaction-api:3030/graphql-alpha failed, reason: getaddrinfo ENOTFOUND devserver.reaction-api devserver.reaction-api:3030
web_1 | at new ApolloError (/usr/local/src/node_modules/src/errors/ApolloError.ts:56:5)
web_1 | at /usr/local/src/node_modules/src/core/QueryManager.ts:489:31
web_1 | at /usr/local/src/node_modules/src/core/QueryManager.ts:1028:11
web_1 | at Array.forEach ()
web_1 | at /usr/local/src/node_modules/src/core/QueryManager.ts:1027:10
web_1 | at Map.forEach ()
web_1 | at QueryManager.broadcastQueries (/usr/local/src/node_modules/src/core/QueryManager.ts:1021:18)
web_1 | at /usr/local/src/node_modules/src/core/QueryManager.ts:388:18
web_1 | at
web_1 | at process._tickDomainCallback (internal/process/next_tick.js:228:7)

Is there any way to run it with reaction. please help about it.


#2

Also getting a similar error, did you manage to fix it?


#3

No, Have you fix it now?


#4

@ashish That error seems to point to the database server not running. Are you also running the Reaction docker containers? It is necessary to at least be running the devserver from the Reaction repo at the same time as running the Starterkit.


#5

My error is slightly different (status code 400, but assuming still issues with reaching the Reaction server) as per below:

web_1 | [GraphQL error]: Message: Cannot query field “heroMediaUrl” on type “Tag”., Location: [{“line”:28,“column”:3}], Path: undefined
web_1 | [Network error]: Error: Response not successful: Received status code 400
web_1 | Error while running getDataFromTree { Error: Network error: Response not successful: Received status code 400

I have run docker network inspect reaction-api, and the containers (both devserver and the starterkit) appear to be attached as per below:

“Containers”: {
“244cd45311ddee02f680c2d3dd7e54ccdb7327938b18d5445fb1b1325b50d4a4”: {
“Name”: “reaction_reaction_1”,
“EndpointID”: “1605ee472c379786c22ad0c33d63f19f5b2c4e43f62f63cf942c9041228ca8ef”,
“MacAddress”: “02:42:ac:12:00:03”,
“IPv4Address”: “172.18.0.3/16”,
“IPv6Address”: “”
},
“8dda4e6fb92da40bf54b1b71146adfd0525730bb21f126866e6ee971cc34157e”: {
“Name”: “reaction_devserver_1”,
“EndpointID”: “d95a706bb97efef495be73a91e863d94cb12f7c350cac814174149ed3fb7092f”,
“MacAddress”: “02:42:ac:12:00:02”,
“IPv4Address”: “172.18.0.2/16”,
“IPv6Address”: “”
},
“ab854009053a854aa4a88d6f30f0d710c9d88c4b5c47ed5db6ceb9f3b4421217”: {
“Name”: “reactionnextstarterkit_web_1”,
“EndpointID”: “a9a581331d879e0cbc77087fcb22569b6dfee7c46831460fd886f2d21ca07e6c”,
“MacAddress”: “02:42:ac:12:00:04”,
“IPv4Address”: “172.18.0.4/16”,
“IPv6Address”: “”
}
},

Any ideas as I am unsure of where to go from here.

Thanks


#6

@erik i successfully run the reaction-next-starterkit but problem is when it run it shows blank page. and in browser console it shows error that no primary shop found.
OPTIONS http://localhost:8080/graphql-alpha net::ERR_CONNECTION_REFUSED
[Network error]: TypeError: Failed to fetch
No primary shop found
GET http://cdn.segment.com/analytics.js/v1/ENTER_KEY_HERE/analytics.min.js net::ERR_ABORTED
analytics.load @ (index):74
(anonymous) @ (index):83
(anonymous) @ (index):89


#7

@ashish These look like two separate issues.

For the data issue, please follow the instructions posted here in the README (https://github.com/reactioncommerce/reaction-next-starterkit) to get the devserver up and running. You need to be running both. The devserver provides the data, and the starterkit provides the UI. In addition, the devserver runs on port ‘3030’ by default, so unless you have changed that to be ‘8080’, that could be your issue.

As for segment, if you would like to track the data, you can follow the insturctions in this PR to set up a segment account: https://github.com/reactioncommerce/reaction-next-starterkit/pull/106

For more responsive help, please use our Gitter channel: https://gitter.im/reactioncommerce/home


#8

I updated to the most recent version of Reaction, and it seemed to work (did not checkout v1.12)