0

I have a Frontity project (React) that I pulled from Github.

When I start with command npx frontity dev in windows terminal (powershell) it start the server and everything works as expected. However, when i try the same procedure in VSC terminal (powershell and terminal) I get the error:

Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.

This should be an issue with VSC it self so I reinstalled VSC and changed the terminal to external, but still no change.

Any suggestions?

Kas Elvirov
  • 7,394
  • 4
  • 40
  • 62
RustyJames
  • 123
  • 7

1 Answers1

0

Solved! When I updated the gitignore-file to include the build folder, everything started working in VSC console aswell. Strange error.

RustyJames
  • 123
  • 7