chrisguttandin/worker-timers

Module not found

Closed this issue · 6 comments

dy commented

Strangely enough, after yarn add worker-timers, running react-scripts start - it loads significantly longer than usual and then gives error

Module not found: Can't resolve 'wroker-timers' in '...\src\utils'

I'm curious if somebody else can reproduce that.

dy commented

The same happens with npm i worker-timers, so the issue is possibly react-scripts (it uses webpack under the hood).

Hi @dy,

can you please tell what I need to do to reproduce the issue. I guess it somehow starts with npx create-react-app my-app, cd my-app, yarn add worker-timers, ... and ends with react-scripts start.

Is that correct? Do I need to modify some files or does the error show up without any file modifications as well?

dy commented

Yes

npm init react-app my-app
cd my-app
npm i worker-timers
... install other things
... write some code
react-scripts start

I hope you'll be able to reproduce that

It works all fine on my end.

Is this maybe because of a typo? Above you wrote that the error is: Module not found: Can't resolve 'wroker-timers' in '...\src\utils'.

It says 'wroker-timers' instead of 'worker-timers'. Did you make the typo while copying the error message or is the typo in an import statement somewhere in your code?

dy commented

My gosh. I am sorry to waste your time. Thank you.

No problem. I'm glad we found it.