Yarn, Error: Cannot find module?

Hey guys, been following this tut: https://www.youtube.com/watch?v=I6ypD7qv3Z8

Ran into an issue of running yarn dev and I get the error of Error: Cannot find module. What in the heck could be causing this issue?

long story short,

its trying to run a module called dev but no such module is installed.

you want to run a script from your package.json called dev so use the following

yarn run dev

The same error occurs when running that as well.

You are trying to run a script called dev and there isn’t a script called dev.

yarn {command} will try to run:

  1. a built in yarn command, not the case here, so
  2. it tries to run a script, which is either a bin script provided by an installed package (for example if you install Typescript you get an executable called tsc, so running yarn tsc inside your project will execute that) or an entry in your package.json scripts field. It will try the latter first, and I assume it’s the latter that you’re supposed to have: if you are getting an error, it means you haven’t defined one, so it can’t do anything except error out

It’s very difficult to tell what it’s for, given the video is very long and I have no idea at what point he adds the script or uses it

Sorry, I had figured it out and realized it was a ridiculous error on my part in not sourcing to the right module. Yarn dev works as it is a custom script in the package.json. Thanks!