-
Notifications
You must be signed in to change notification settings - Fork 492
Can't find certain modules when reloading on saved changes (watcher) #368
Comments
Does this happen on macOS only, or on other operating systems as well? Since this fork does not modify the related configuration for the mode, this is more likely to be a general issue, either of the way CRA configures the watch behavior, or of the way |
Same issue with styled-components library. Appears randomly when reloading on saved changes. Import as: When reloading on saved changes: Operating System: Windows 10 1803 |
Hmm so this happens on Windows too.. The URL you provided is invalid by the way, can you reference the specific issue? @gregorianisch |
@Fabiantjoeaon thanks, fixed the link. For me it worked when I specified module typings out of Content of
Couldn't find the real cause of an issue, but this temp fix will probably help you also. P.S. You will need to update your |
I see. I think it might has to do something with the naming of the typings file? The module in question for me is
I installed So overwriting it the way you suggested might be the right fix, but you have to do it for every module, that's why I just tend to use Is this the fault of the author of the modules (which seems unlikely to me?), or is it something in our configuration? Also, kinda strange that it does work when restarting yarn. |
Is this a bug report?
Yes
Can you also reproduce the problem with npm 4.x?
Yes
Which terms did you search for in User Guide?
Reloading, module reloading, watcher
Environment
npm ls react-scripts-ts
(if you haven’t ejected):[email protected]
node -v
:v8.11.2
npm -v
:4.6.1
yarn --version
(if you use Yarn):1.7.0
npm ls react-scripts-ts
(if you haven’t ejected):[email protected]
Then, specify:
macOS 10.13.4
Chrome 67.0.3396.99 64-bit
Steps to Reproduce
Expected Behavior
I'm using
create-react-ts
withpixi.js
(and@types/pixi.js
), for using additional filters I installed the modulepixi-filters
, I expected everything to go well in my workflow.Actual Behavior
Everytime I run
yarn start
, the build process proceeds without problems, however, when reloaded using watchers, sometimes I getCannot find module pixi-filters
, which has been installed correctly.Because of the type definitions, I imported it as
import * as filters from "pixi-filters";
instead ofimport filters from
pixi-filters`` (not sure if this matters).This is however, not the only module it happens to, also a custom module which we install through SSH.
When I run
yarn start
again, it's fixed. Might be something to do with timing?This is my tsconfig:
Reproducible Demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
The text was updated successfully, but these errors were encountered: