-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
next dev constantly errors when using emacs, failing to load emacs lock files #15278
Comments
A couple other notes that might help - I saw that |
To disable lockfiles for a specific project only https://stackoverflow.com/questions/62567370/reactjs-local-server-crashes-after-editing-file-in-emacs-even-without-saving |
I posted a comment in #8238 as well.. This is easy to reproduce via: host:next.js kjmph$ ln -s notexists examples/basic-css/pages/testfile
host:next.js kjmph$ yarn next ./examples/basic-css/
yarn run v1.22.10
$ node --trace-deprecation packages/next/dist/bin/next ./examples/basic-css/
ready - started server on http://localhost:3000
[Error: ENOENT: no such file or directory, stat '/home/kjmph/next.js/examples/basic-css/pages/testfile'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/home/kjmph/next.js/examples/basic-css/pages/testfile'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. I'm causing it to manifest slightly differently, yet it appears to be the same thing. |
This is still an issue, disabling lockfiles for emacs is not a good fix for this at all. |
I spent some time digging into this myself. The unhandled promise rejection looks to be coming from this issue: paulmillr/chokidar#955 |
As an alternate workaround to disabling emacs lockfiles, applying this patch directly to |
I have a fix for this staged here if you are using a custom webpack configuration, you can extend the existing config until the fix is released, maybe something like this config.watchOptions = config.watchOptions.concat('**/.#*') |
- also updates gitignore Fixes: vercel#15278
- also updates gitignore Fixes: vercel#15278
- also updates gitignore Fixes: vercel#15278
Fixes: #15278 > Bug report > When using next dev with emacs, as you develop, emacs creates symbolic link files starting with .# as lock files. Next.js seems to attempt to load these but fails, spewing out errors constantly. Prevents dev server from crashing when emacs creates lockfiles tested with: - GNU Emacs 27.1 - OSX 11.1 - Node v15.4.0
Voting to reopen this issue, as it is still an issue with |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
When using
next dev
with emacs, as you develop, emacs creates symbolic link files starting with.#
as lock files. Next.js seems to attempt to load these but fails, spewing out errors constantly.To Reproduce
next dev
.js
files using emacsExpected behavior
I expected to not get these errors
System information
Additional context
I tried adding a webpack ignore filter to ignore these files, but it did not have any effect.
The text was updated successfully, but these errors were encountered: