New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Watch mode does not watch. #1828
Comments
Changed to a more helpful title. |
Hi @trusktr , I tried running it and it worked fine for me. I updated your repo (infamous) to use latest version |
Weird, I just updated to 0.53.1, and it just exits with error code
|
Alright, I deleted node_modules/rollup* and reinstalled, and now it works. This has happened to me several times now, not sure what's going on yet. Only Here's my reproduction branch: https://github.com/trusktr/infamous/tree/rollup-rollup-issue-1828
both of those are exiting with error code |
I'm afraid this branch also works fine for me. :(. I couldn't reproduce it. I use VS Code. Could you delete all your node_modules, and npm cache and try again? The watch mode runs just like the above gif I posted on |
Also, could you clone this and try to run it in watch mode? |
It doesn't work for me with that minimal repo either! This is what I get:
That line looks like this:
That's not a very helpful error! |
I'm on I'm in Chrome OS, running Ubuntu 16.04.3 LTS (xenial) in a chroot set up with Crouton. So I'm basically in a "Linux" environment. What other info can I provide? |
I'm running Node
|
I believe I am experiencing a similar issue as well, but I've found that if I save multiple times in a row it usually updates. VSCode |
I also have this irritating problem, whenever i make some change using vim nothing happens. |
Same issue here, where watch doesn't do anything when files in my include path changes. Docs show to use a watch config: // rollup.config.js
export default {
...,
watch: {
include: 'src/**'
}
}; Nothing happens, similar to the comments from others. However, I was able to get it to work by passing in the paths to
// rollup.config.js
export default {
...,
watch: {
chokidar: {
paths: 'src/**'
}
}
}; |
I switched back to Webpack, for now. Rebuilding was taking up too much time. Looking forward to it being fixed! |
Oh, wait, I don't think tried that chokidar option. I'll give that a go... |
even with chokidar as an option, on Windows 10 with rollup 0.57.1 nothing is watched. |
This is definitely a bug with rollup. Installing |
works here on Linux when is set |
Does it have a TTY? i just ran into this w/ docker-compose which drops tty stuff by default |
I think I'm experiencing something similar. Half of the time Windows 10 plugins: [
resolve(),
uglify(),
buble(),
commonjs()
] |
I think I figured out the original issue, and a workaround: |
@mourner thanks for the update... do you think it would be worth reverting to the former behaviour? Would you be interested in a PR here at all? |
@guybedford I think it should be either reverted, or supplied with a helpful error message, because it's really confusing when you're upgrading from an older version and watch mode just stops working without any indication of what's exactly wrong. I'd happily let someone else do a PR though — might be a good "first PR" issue. |
Looks like it might be a different issue than the one reported by the original poster, because in their example the command is |
Worth checking. If you're on Linux, check that your watcher is not running out of file handles : On Linux and OS X if you delete a watched path/dir/file, and then recreate it, the deleted inode will continue to be watched by fs.watch() : The watch will emit an event for the delete but will continue watching the original inode. |
i had similar problems running
|
I confirm that adding |
i have tried a variety of different variations, but nothing seems to work except for js & sass files. specifically i have an html file that i am using the did you who seemed to solve the issue, solve it for any file type? |
I had an issue with codesplitting and entryFileNames option: The solution is to do something like this in your rollup.config.js:
|
Hey folks. This is a saved-form message, but rest assured we mean every word. The Rollup team is attempting to clean up the Issues backlog in the hopes that the active and still-needed, still-relevant issues bubble up to the surface. With that, we're closing issues that have been open for an eon or two, and have gone stale like pirate hard-tack without activity. We really appreciate the folks have taken the time to open and comment on this issue. Please don't confuse this closure with us not caring or dismissing your issue, feature request, discussion, or report. The issue will still be here, just in a closed state. If the issue pertains to a bug, please re-test for the bug on the latest version of Rollup and if present, please tag @shellscape and request a re-open, and we'll be happy to oblige. |
@brewster1134 Same issue for me. It watches and works for every type of file except for html files. Not sure why. Stuck last 3 hours with this :-( |
I am also facing same issue. so far nothing worked. |
I ended up adding:
this works pretty slick on Mac OS. |
Just in case anyone is facing this issue while using WSL2 on Windows, and your files are under the windows filesystem, move them to the distro's filesystem and it shall work. |
@caiodv Thanks, doing everything from WSL2 works for me. Though I'm not sure why the issue still exists on Windows as inotify is supposed to be supported by Docker Desktop for Windows since "Docker Desktop Community 2.2.0.0 / 2020-01-21".
Source: https://docs.docker.com/docker-for-windows/release-notes/#bug-fixes-and-minor-changes-8 |
Using WSL 2 with docker containers Deleting my node_modules in my project, and deleting rollup in my C:\Program Files\nodejs\node_modules global folder and force reinstalling with npm i -g rollup --force worked for me. Make sure to install your code in a linux filesystem instead of using WSL file-sharing (eg: put your files in an Ubuntu filesystem, and use VSCode Remote-WSL extension) |
This works for our project. And you need to install chokidar manually: |
Hi, any progress on this issue so far? I'm experiencing the same distress, woohoo. |
For whoever is desperate and see this comment, if this issue is not re-opened and addressed, here is a configuration example for the following architecture of files (using React for server-side rendering of lazy routes).
import {resolve} from "path";
export default [
{
input: resolve("client.js"),
output: {
dir: resolve("build", "client"),
format: "esm"
},
watch: {
include: resolve("**", "*.js"),
exclude: resolve("node_modules", "**", "*.js"),
chokidar: {
usePolling: true
}
}
},
{
input: resolve("server.js"),
output: {
file: resolve("build", "server", "server.js"),
format: "esm",
inlineDynamicImports: true
},
watch: {
include: resolve("**", "*.js"),
exclude: resolve("node_modules", "**", "*.js"),
chokidar: {
usePolling: true
}
}
}
]; |
For my issue, watch works exactly once, meaning that it rollup recompiles the first time I save a file, but never again after that. I'm pretty much stuck with using nodemon and running the build task over and over again. |
I just upgraded to
0.53.0
and Rollup no longer even tries to watch anything. Instead, it exits back to the command line right after the first build as if I ranrollup
without the--watch
option. However, it does enter the alternate buffer while building, but then returns back to the main buffer when the first build finishes.The text was updated successfully, but these errors were encountered: