question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webpack watcher cannot recover after a file is recreated

See original GitHub issue

Hey there,

I’m getting the following error:

Failed to compile.

../teselagen-react-components/es/index.js
Module build failed: Error: ENOENT: no such file or directory, open '/Users/tnrich/Sites/teselagen-react-components/es/index.js'

when trying to build my locally-linked npm module, teselagen-react-components.

What happens is that the build process removes all the files first, and then re-adds them (I have no way to control this). CRA, will sometimes be okay with this, but maybe 1 out of 4 times when I’m rebuilding, I’ll get the above error. Even though I can go to the file, /Users/tnrich/Sites/teselagen-react-components/es/index.js and verify it really is there.

There seems to be no way to get CRA to believe that it is there once it has detected it is missing.

Is there anything I can do to fix this?

Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Timercommented, Sep 29, 2017

Fair enough. I’ll tag this as needing investigation by someone motivated, but I feel it’s definitely a webpack bug.

0reactions
gaearoncommented, Jan 8, 2018

I’ll close as it’s unlikely anything will happen to this here. I encourage you to file an upstream bug with webpack.

Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack-dev-server does not watch on the new files created
I have googled and searched but can't find anything that will automatically add new files to my watcher. javascript · node.js · webpack...
Read more >
CopyWebpackPlugin | webpack
Copies individual files or entire directories, which already exist, to the build directory. Getting Started. To begin, you'll need to install copy-webpack- ...
Read more >
Turbopack, the successor to Webpack - Hacker News
I went to build from source and can't even find it in their source files. I didn't realize alpha releases meant build from...
Read more >
Webpack watcher does not get triggered on save
When running Webpack in watch mode in a terminal, I noticed that saving a file in my project does not trigger Webpack.
Read more >
Migration to Vue 3 - GitLab Docs
The migration from Vue 2 to 3 is tracked in epic &6252. ... We will move our facade to the separate file and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found