Runtime Error Cannot find module "../schedule/schedule"

My app suddenly stopped working, throwing the error:

“Uncaught Error: Cannot find module “…/schedule/schedule””

I can find no reason as to why this isn’t working, I even reverted my changes and the problem persisted.

The only potential issue i think was that i accidentally created a package.json file in the ‘schedule’ directory, but see no way in which that would cause a problem?

  npm run build

This fixed the problem!

1 Like