Skip to content
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

Yarn failing on CI on Windows #16426

Closed
nicolo-ribaudo opened this issue Apr 12, 2024 · 6 comments · Fixed by #16427
Closed

Yarn failing on CI on Windows #16426

nicolo-ribaudo opened this issue Apr 12, 2024 · 6 comments · Fixed by #16427

Comments

@nicolo-ribaudo
Copy link
Member

Something broke in Yarn between April 7 and April 12. Maybe a new release? The first failing commit is 9cd048b, that doesn't touch Yarn in any way. This what CI logs:

rm -rf node_modules
rm -rf packages/*/node_modules
rm -rf codemods/*/node_modules
rm -rf eslint/*/node_modules
yarn install
Error: 
command: C:\NPM\PREFIX\YARN.CMD install
code: null
    at Vy (D:\a\babel\babel\Makefile.js:4:124507)
    at Hy (D:\a\babel\babel\Makefile.js:4:124624)
    at $y.bootstrap-only (D:\a\babel\babel\Makefile.js:4:127328)
    at c.target.<computed> [as bootstrap-only] (D:\a\babel\babel\Makefile.js:4:104620)
    at D:\a\babel\babel\Makefile.js:4:104727
    at Array.forEach (<anonymous>)
    at Timeout._onTimeout (D:\a\babel\babel\Makefile.js:4:104681)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
yarn gulp build-dev
Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)

$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require #0] <scriptName> ...

It seems running yarn install is failing, but the stack trace is useless (it's only our makefile-internal stack).

@liuxingbaoyu is it failing for you locally?

@liuxingbaoyu
Copy link
Member

Now it is successful locally. I suspect this is a regression caused by the node version. I will try it after updating node.

@liuxingbaoyu
Copy link
Member

I confirmed that nodejs/node@9095c91 was the cause, I'm surprised this was released as a security fix.

@nicolo-ribaudo
Copy link
Member Author

It looks like we can just pass the 'shell' option: nodejs/node@9095c91#diff-58df6954f1fee545ecd3b5e7571db022b56d00217b41e75d849edb1e0719d04dR4

@liuxingbaoyu
Copy link
Member

I tried this and it throws an error because the path contains spaces.
C:\Program Files\nodejs\yarn.CMD

@nicolo-ribaudo
Copy link
Member Author

nicolo-ribaudo commented Apr 13, 2024

Can we somehow escape the space?

@liuxingbaoyu
Copy link
Member

liuxingbaoyu commented Apr 13, 2024

Sure!
I'm not sure if we need to escape parameters (git), that seems more convenient with execa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants