I'm getting this error if I run yarn start in the ...
# prisma-whats-new
e
I'm getting this error if I run yarn start in the root project folder: Module not found: Can't resolve 'react-apollo' I'm not sure if I'm supposed to run yarn start in the root folder or the server folder. It gets further in the process in the root folder.
i
Run it in the same directory as your package.json
And maybe run yarn just in case it didn’t install
e
Thanks! There's a package.json in both the server and the root.
I ran yarn already
my guess is that yarn start should run in the root.
i
Is it a project you created or are you following a tutorial? Or do you have it public on Github?
e
I'm doing the tutorial "authentication with email and apollo"
I have it on github...need to push some things...
I pushed everything
I'm on #19
I added the code to CreateUser.js
so that's probably the issue
although it could be from something in earlier steps since I didn't try to run it until #19
i
Hmm
I just ran
yarn
and then
yarn start
in root and everything worked
react-apollo
shouldn’t be in
server/
though
e
oh really....well maybe there's something going on with my environment. I'm glad that it worked.
Makes sense about ract apollo. That was in their file...
i
Yeah, I just cloned your repo. Maybe try with NPM and see if you get the same result?
I’ll shoot a PR over to them real quick
e
ok, thank you. I didn't see react-apollo in the server. Do you remember where you saw it?
i
It’s in the package.json
e
oh ok
The error I'm getting is: Module not found: Can't resolve 'react-apollo' it says that this is from index.js. I don't see an import react-apollo in that file.
but it ran for you...
i
Hmm… Try
rm -rf node_modules
from both root & server
And then
yarn
again both directories
e
ok
i
If that doesn’t work, let me know. I’ll try to figure something else out
e
I have these errors when I ran yarn in server: react-apollo@2.0.4" has unmet peer dependency "apollo-client@^2.0.3". warning " > react-apollo@2.0.4" has unmet peer dependency "react@0.14.x || 15.* || ^15.0.0 || ^16.0.0". warning "react-apollo > apollo-link@1.0.6" has unmet peer dependency "graphql@^0.11.
maybe that's the issue
i
Theoretically, you don’t need any graphql related deps in your client
e
ok
getting the same error on yarn start
i
If you want to do stuff with GraphQL, you do. But the example app currently doesn’t even have any queries or mutations
It should start anyway, though
Those are just warnings. I get them all the time
e
ah ok, good to know
i
Remove
react-apollo
from
server/package.json
and those warnings should go away.
e
ok
i
(After you
yarn install
again)
Unless you
yarn remove react-apollo
. Then your
yarn.lock
is updated
e
ok, I did yarn install
i
Cool. Try to start react again
e
react or yarn start? Not sure what you mean by start react.
yarn start still has the same error
i
Try going to local host port 3000 anyway
Actually, screenshot the output phone your terminal
From *
e
after yarn start?
nothing at 3000
tried different routes also
i
Okay. Push any changes up to git and I’ll see if I am getting any errors
e
ok
ok push it
pushed
i
Okay
I’m going to send a PR on your repo. There were some changes in Apollo 2
e
ok cool, I really appreciate you help.
i
Sure thing!
e
I'm going to head out in a couple of minutes, but I will check back on this later/tomorrow. I'm eager to get this stuff running.
i
Cool. I have to fix one small bug and then I’ll push my changes. Feel free to DM me if you have any questions
e
awesome
i
I’m about to shoot over that PR but just a heads up… I’ve got it to working capactiy, as far as installing packages & running, but functionality is still missing. I’m assuming you probably want to continue with the tutorial, so I won’t add all of the functionality. Also, I’m going to shoot a PR over to that example repo to clean some stuff up.
e
Uh, I messed up on the merge. Not sure how to fix it. Maybe I should just make a new directory and clone your branch?
i
That’s okay. Let me take a look real quick
Looks like it merged fine
Just
git pull
and you should have that merge locally
e
But locally I don't have all the changes in my master, then I made a couple of changes
i
Yeah,
git pull
and you may have to deal with merge conflicts
Depends on what you changed
e
ok
i
🙂
e
I have to get some food in me...lol. I suck at git. I'll let you know where it's at when my brain is functioning again.
ok, I cloned your repo, and it ran. Well it didn't do anything once I entered a password and email and clicked, but it printed to the page.
I thought it would be quicker than working out my mess on git.
probably not a good habit.
i
That’s okay. There aren’t any really good tutorials on Git. I screw up stuff all the time too 🙂
I should make a small course on it and put the course up on YouTube…
e
that would be awesome
it's cryptic, good to have a concise method
i
Cool. I’ll make a course this week and see you the link
* If I can get to it. I’m refactoring a massive project from JS to TS right now, so depends when I finish that and get it to compile again 😅
e
awesome, thank you for all your help. I'll move forward with this tutorial
yeah no worries
i
😄
e
TS = ?
typescript?
i
TypeScript
e
ok
when I enter a user it does not update on the graphcool console. Is that because the console is not local or because I need to restore/make a connection to the console?
i
Make sure docker is running
And your instance as well
graphcool local up
e
ok
i
I think the newest version of the CLI is
graphcool local start
e
from root?
i
From
server/
e
graphcool seems to run ok. The project id looks correct, but it does not update on the gc console, hmmmm
i
Did you finish the tutorial
e
no
i
Yeah, so finish that. I didn’t add any logic in my PR
Just got it to build again for you
e
ah ok, I thought it was maybe connected from the stuff that I did. cool.
oh, it's supposed to be connected by now in the tutorial, hmmm. That's why I was checking...
i
What part are you on?
I’m pretty sure the tutorial code doesn’t work
e
#19
ah, so I should just go ahead to #20 then
i
Probably
I’ll look at it in a bit
e
Cool. I've noticed that the docs on github are different than in the tutorial.
I switched to a howtographql.com turorial, which is going better. Still want to figure the graphcool one out to help me learn this stuff.