-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
ERR_LOADER_CHAIN_INCOMPLETE
issue with Node.js v18.6.0
#1839
Comments
I'm guessing that this is being caused by a combination of the file being imported, and the file it's imported from, so I might be able to reproduce given those two bits of data, even if you don't have a complete reproduction. |
I've actually only had the issue happen in CI so far, I just saw some buzz around the original issue and wanted to get something filed so we'd have something to work off of. I'll see if I can identify the file being imported, and the file it's imported from. Anybody else with something closer to a reproducible sample, feel free to chime in. |
Do you think it might be related to stuff happening within node_modules? Our default "ignore" mechanism doesn't touch stuff in node_modules, so perhaps that's triggering a different code path in our hooks? Is there at least a simple cypress invocation that reproduces it? Or perhaps is it a race condition? A lot of this loader stuff is async, maybe we're triggering a bug inside node? |
Here is a minimal reproducible sample using Cypress: ts-node-1839.zip Using VSCode to open the above as a dev container, reproduce with:
|
I don't know if it matters but the latest Cypress What I mean is not to do some hacks until cypress checks if the latest version of |
The only thing that doesn't quite add up about that is the timing. I only started seeing this issue around the 13th with the release of Node v18.6.0. Could still be a contributing factor though. Great catch. |
The absolute latest version of ts-node is required for node 18.6.0. That would be ts-node 10.9.1, which was released yesterday. Friendly reminder for anyone reading along, that node's loader hooks are "experimental" status, with everything that implies: https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#loaders |
Okay so this is a Cypress problem, not a ts-node problem unless @faradaytrs has details relating to their issue that suggest otherwise. |
That's my current guess, but if a reproduction shows this happening with ts-node 10.9.1 then I'll dig into it. I see that the error, when it occurs, logs the path to ts-node. That should allow someone to open up the |
Marked "external" till we confirm with the cypress folks. |
I had the same issue, but upgrading to the latest |
Based on linked issues, sounds like this is fixed by upgrading ts-node to the latest version. Node made a breaking change to loaders and we updated accordingly. But if you're using an old version of ts-node then you won't have that necessary update. Gonna close this. If anyone hits a situation where they think ts-node needs to make a code change, please open a new issue, and link to this one if appropriate. |
We noticed this problem too when trying to upgrade to Cypress 10.6 from 9.5, on Node 16. Upgrading ts-node to latest did not help. But downgrading Node from 16.17.0 to 16.16.0 does fix the issue. |
Based on the descriptions above, cypress needs to use the latest ts-node, so it actually depends on cypress doing the right thing, not necessarily you upgrading. Keep in mind that npm often has multiple different versions of a single package installed in a dependency tree. |
I see the same issue without any Cypress. Node 16.17.1, ts-node 10.7.0. Updating ts-node to 10.9.1 fixed it. This was most likely caused by a change brought by the node package being auto-updated. |
Originating issue: cypress-io/cypress#22795
Search Terms
ERR_LOADER_CHAIN_INCOMPLETE
,cypress
Expected Behavior
Don't short circuit on
resolve
? Although @cspotcode indicated that this might be a red herring.Actual Behavior
Steps to reproduce the problem
Working on a minimal sample that doesn't include Cypress...
Minimal reproduction
Working on a minimal sample that doesn't include Cypress...
Specifications
So far I've only seen the issue occur on Linux in CI, not Windows.
This is from the GitLab runner (Docker):
The text was updated successfully, but these errors were encountered: