Skip to content

Commit

Permalink
Update local environment setup steps to fix npm link problems per issue
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminWFox authored and iaincollins committed Jul 27, 2020
1 parent c3a91ae commit f892dc2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,17 @@ A quick and dirty guide on how to setup *next-auth* locally to work on it and te
npm i
npm run build

3. Link React between the repo and the version installed in your project:
3. Link your project back to your local copy of next auth:

npm link ../your-application/node_modules/react
cd ../your-application
npm link ../next-auth

*This is an annoying step and not obvious, but is needed because of how React has been written (otherwise React crashes when you try to use the `useSession()` hook in your project).*
4. Finally link React between the repo and the version installed in your project:

4. Finally link your project back to your local copy of next auth:
cd ../next-auth
npm link ../your-application/node_modules/react

cd ../your-application
npm link ../next-auth
*This is an annoying step and not obvious, but is needed because of how React has been written (otherwise React crashes when you try to use the `useSession()` hook in your project).*

That's it!

Expand Down

0 comments on commit f892dc2

Please sign in to comment.