pluralsight-designing-react-components-course-code icon indicating copy to clipboard operation
pluralsight-designing-react-components-course-code copied to clipboard

Received Unhandled Runtime Exception while setting up dev environment

Open BPMSoftwareSolutions opened this issue 3 years ago • 3 comments

Unhandled Runtime Error Error: No router instance found. You should only use "next/router" inside the client side of your app.

Source .next\static\chunks\fallback\main.js (116:10) @ getRouter

114 | 'No router instance found.\n' + 115 | 'You should only use "next/router" inside the client side of your app.\n'

116 | throw new Error(message) | ^ 117 | } 118 | return singletonRouter.router 119 | } Call Stack .next\static\chunks\fallback\main.js (12:2) _callee$ .next\static\chunks\fallback\main.js (12:2) Generator.invoke [as _invoke]

BPMSoftwareSolutions avatar Jan 12 '22 17:01 BPMSoftwareSolutions

Hi @BPMSoftwareSolutions , can you point me at the specific file? I don't think I'm doing any routing in the course, but I may be forgetting.

pkellner avatar Jan 12 '22 17:01 pkellner

I'm in the directory: 02-designing-better-components\clip-02-setting-up-our-dev-environment

I ran the following CLI command: npm run dev

I've installed the packages and followed the instructions in the video in module 02.

BPMSoftwareSolutions avatar Jan 12 '22 17:01 BPMSoftwareSolutions

I just checked that source and built it local without any issues. Couple things to try.

  1. verify you have the latest node and npm installed
  2. try downloading my completed source into another folder and see if that builds. If it does, compare it to what you built.

I'm guessig it's a version problem some place, but these problems can be hard to track down, especially, when the absolute basics don't work. LMK

pkellner avatar Jan 12 '22 17:01 pkellner