webpack-dev-server doesn't find packages right after they're installed
Phoenixmatrix opened this issue · 8 comments
Not sure if it's a problem with my setup (well, it kind of has to be, since in your video it works fine, hah), but when the plugin installs a package automatically (which works very well), the webpack dev server throws an error that the package isn't there. If I ctrl+s the file again without any modification, then it works.
Kind of like if there was a race condition, and webpack tried to recompile too quickly. Any thought? This is on Windows, in case its OS specific (didn't try on OSX yet)
I'm having the same issue on OSX
Yep, this is an issue I was having as well. Webpack's a confusing ball of mud, so it'll get fixed (eventually). It was the sacrifice made to support resolve.root
and resolve.alias
.
A quick fix could be to restart webpack? - If you could give any pointers as to where in my version i can hack that would be great.
@samuelbirch Easier fix would be to just Ctrl-S any file being watched by WDS, so you don't have to startup the server again.
@prashcr I could live with that, but that doesn't work for me. I have to restart webpack in order to get it working.
@samuelbirch I'm taking a stab in the dark, but are you using WebStorm by any chance?
I think I have this mostly resolved in v3.1.0
. Please track that release.
There's really no way for me to get this working 100%. Resolving loaders is great, but normal modules is abysmal.
It's as if Webpack's like "Sure, I'll let you install this dependency first, but I already checked and it wasn't there so I don't care what you think!".
Unless someone is very knowledgeable with Webpack's inner workings & can help resolve this (the /example
is a fantastic testing ground), I'm on my own.