turbo
turbo copied to clipboard
Turbo fails on windows
What version of Turborepo are you using?
1.3.4
What package manager are you using / does the bug impact?
Yarn v1
What operating system are you using?
Windows
Describe the Bug
Running yarn command returns this:
er dependency "react-dom@^16.6.0 || ^17.0.0".
[4/4] Rebuilding all packages...
[-/4] ⡀ waiting...
[-/4] ⡀ waiting...
[3/4] ⡀ esbuild
error C:\projects\javascript\tentree\zos\node_modules\turbo: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: C:\projects\javascript\tentree\zos\node_modules\turbo
Output:
C:\projects\javascript\tentree\zos\node_modules\turbo\install.js:42
throw new Error(
^
Error: Expected "1.3.4" but got ""
Expected Behavior
to install turbo succesfully
To Reproduce
Just install in any project with turbo repo
If I skip install scripts, turbo won't work (will hand on the cli commands)
@darklight9811 are you still seeing this with the latest version of Turbo? Main thing I'd like to narrow down is if this is a Windows-specific issue or not, before moving forward
@mehulkar its working now
@mehulkar out of nowhere the bug started again...
[4/4] Building fresh packages...
[1/4] ⢀ turbo
[2/4] ⢀ core-js-pure
[-/4] ⢀ waiting...
error C:\projects\javascript\tentree\zos\node_modules\turbo: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: C:\projects\javascript\tentree\zos\node_modules\turbo
Output:
node:internal/errors:841
const err = new Error(message);
^
Error: Command failed: node C:\projects\javascript\tentree\zos\node_modules\turbo\bin\turbo --version
at checkExecSyncError (node:child_process:828:11)
at Object.execFileSync (node:child_process:863:15)
at validateBinaryVersion (C:\projects\javascript\tentree\zos\node_modules\turbo\install.js:25:6)
at C:\projects\javascript\tentree\zos\node_modules\turbo\install.js:305:5 {
status: 1,
signal: null,
output: [ null, Buffer(0) [Uint8Array] [], Buffer(0) [Uint8Array] [] ],
pid: 5204,
stdout: Buffer(0) [Uint8Array] [],
I'm trying to debug this because this broke my entire project and I need it back running urgently. From what I can tell, its crashing on the execFileSync because turbo.exe (for windows) is not returning anything.
If I try to run this execFileSync command directly it throws this:
C:\projects\javascript\tentree\zos\node_modules\turbo-windows-64\bin\turbo.exe:1
MZ�
SyntaxError: Invalid or unexpected token
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1033:15)
at Module._compile (node:internal/modules/cjs/loader:1069:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47
```
I believe it may be something related to the node version (I'm currently using 16.16.0 and 16.17.1), turbo's window exe has an issue with it, now I need to find what node version this stops breaking
@darklight9811 As a workaround, can you pin the version of turbo
to the version that was working for you?
And then we can investigate what is happening with the later version. Can you also confirm which versions are working vs giving you an error?
@gsoltis
actually I can't get any version of turbo to work. The issue seems on the turbo.exe
file, node version 14.20.0 makes all those versions work (will test more node versions to see where it starts to break).
I suspect what is happening here is the following:
- During post-install,
turbo
replaces the binary atbin/turbo
with the native binary. - The restored version from the cache has been mutated to have that binary.
- The version check here (from the post-install script) is now trying to run against the binary.
How to get back to a working state, two options:
A. Remove your Yarn cache (yarn cache clean
). Remove your local node_modules. Remove any other node_modules cache sources (e.g. CI). Rerun install.
B. Use yarn install --ignore-scripts
to ensure that turbo
's post-install script is not run.
@nathanhammond actually already ran with a clean cache because I was toggling between node versions (with nvm, that makes me install yarn everytime, I'm not certain it clears its cache, so I will double check that).
But it runs on certain node versions, so that may be a combination of OS, node, yarn and turbo (and some other thing?)
And I can't ignore scripts because turbo doesn't work without postinstall.
I'm informing that we will be removing turbo from our project since it has harmed our productivity. I believe the issue is actually related to a dependency that somehow crashes with turbo, but since the exe doesn't throw a useful error, I can't debug this properly.
@darklight9811 Sorry to hear that turbo
didn't work out for you. If you end up finding out what dependency is causing an issue, I would appreciate it if you could let us know what piece of information would have been useful for turbo
to surface to you so that you could debug more easily.
For me, the virus scanner (avira) detected a malware in turbo-windows-64/bin/turbo.exe, maybe that is the problem.