-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
v1.21.0 breaks with next.js, or without graceful-fs upgrade #264
Comments
Can confirm, we ran into the same issue with version 1.21.0 with a dependency that referenced
My guess is that libraries were depending on the error being thrown to determine that the file / directory wasn't present. |
Oof, ok - any idea which ones? |
In our particular case, the library that was the upstream dependent of
|
And it was Babel breaking, or cypress? |
@ljharb It was babel, in my case, babel-plugin-macros. Cypress played no role in my setup (see the stacktrace above). |
This is the full stack from Cypress. We were hacking up code yesterday to understand the issue, and I think we modified
|
@benbender's example doesn't include graceful-fs either, which is helpful to narrow things down. However, it is using pnpm, which complicates matters. @benbender, you said v2 also works - how are you confirming that? @tvsbrent's example suggests it might be the graceful-fs bug that should be fixed by yesterday evening's release of graceful-fs - can you confirm graceful-fs is fully upgraded? To be clear, I could just revert the change, but I want to do it along with a test that prevents it from happening again. |
@ljharb Yep, it does appear that using 4.29 of |
@ljharb it's not depending on the package manager - npm, yarn, pnpm have the same issue (confirmed this morning). About v2 working: I've pinned both version (v1.20 and v2) and both were working for me. I think it may be the case that the changes in v1.21 are triggering bugs in multiple packages ( |
Thanks, trying to repro now (with |
@ljharb you should see |
@benbender the stack trace suggests that it's because It seems like a pretty big concern that next is publishing bundled third-party modules, but it also seems like the quickest fix is for |
@ljharb I don't think that this is the problem. The problem occurred without an update of nextjs and is not resolved if I pin |
@benbender right, that's what i'm saying. next doesn't require graceful-fs, it bundles it - so you have no ability to alter which version of graceful-fs it's using. Which means that v1.21.0 of resolve's new usage of |
@ljharb would you be able to open a bug in @vercel/nft as you have the deeper understanding of the problem? |
I don’t use it; it’d be great if you filed it, and I’ll comment on it to expand as i can. |
Done in vercel/nft#257 |
Yikes, @ljharb - looks like my concern about unintended use & monkey patching did come back to bite us 😅. Happy to see graceful-fs produced the requisite change and things are unbroken again. |
@benbender looks like the issue needs to be filed on |
This bumps `@vercel/nft` to the latest version and consequently bumps `graceful-fs` to the latest version. - Fixes #33003 - Related to vercel/nft#258 - Related to browserify/resolve#264 Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
Looks like |
@ljharb upgrading to I came across the error by using babel-plugin-inline-react-svg for reference. |
Great to hear. I'll close this once v12.0.8 of next is published. In summary:
|
next@12.0.8 is released, so I'm going to close this. Cypress still needs to do a fix (cypress-io/cypress#19610), and meteor-tool (#271), but everything else seems to be fine, and none of this has been an actual problem with Thanks for reporting! |
This bumps `@vercel/nft` to the latest version and consequently bumps `graceful-fs` to the latest version. - Fixes vercel#33003 - Related to vercel/nft#258 - Related to browserify/resolve#264 Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
Sadly, v1.21.0 seems to break babel-plugin-macros. If I pin
resolve
tov1.20.0
, everything is fine.2.0.0-next.3
also seems to be working. This is especially hard to debug, as its a transient dependency of many libs/plugins and a minor update. It took me quite a while to find it... :)Related stacktrace:
The text was updated successfully, but these errors were encountered: