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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃挜 Turbo instalation fails on Windows 馃槬 #947

Closed
b12k opened this issue Mar 25, 2022 · 17 comments
Closed

馃挜 Turbo instalation fails on Windows 馃槬 #947

b12k opened this issue Mar 25, 2022 · 17 comments

Comments

@b12k
Copy link

b12k commented Mar 25, 2022

What version of Turborepo are you using?

all versions after 1.1.6 (except 1.2.0-canary.3 - this one is OK)

What package manager are you using / does the bug impact?

npm

What operating system are you using?

Windows

Describe the Bug

npm install turbo fails on Windows.
Last working version is 1.1.6.

位 npm i turbo -D
npm ERR! code 1
npm ERR! path C:\code\b12k\turbo-install\node_modules\turbo
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node install.js
npm ERR! node:child_process:828
npm ERR!     err = new Error(msg);
npm ERR!           ^
npm ERR!
npm ERR! Error: Command failed: node C:\code\b12k\turbo-install\node_modules\turbo\bin\turbo --version
npm ERR! C:\code\b12k\turbo-install\node_modules\turbo\bin\turbo:13
npm ERR!     throw e;
npm ERR!     ^
npm ERR!
npm ERR! <ref *1> Error: spawnSync C:\code\b12k\turbo-install\node_modules\turbo-windows-64\turbo.exe EPERM
npm ERR!     at Object.spawnSync (node:internal/child_process:1111:20)
npm ERR!     at spawnSync (node:child_process:814:24)
npm ERR!     at Object.execFileSync (node:child_process:860:15)
npm ERR!     at Object.<anonymous> (C:\code\b12k\turbo-install\node_modules\turbo\bin\turbo:6:28)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1103:14)
npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
npm ERR!     at node:internal/main/run_main_module:17:47 {
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'spawnSync C:\\code\\b12k\\turbo-install\\node_modules\\turbo-windows-64\\turbo.exe',
npm ERR!   path: 'C:\\code\\b12k\\turbo-install\\node_modules\\turbo-windows-64\\turbo.exe',
npm ERR!   spawnargs: [ '--version' ],
npm ERR!   error: [Circular *1],
npm ERR!   status: null,
npm ERR!   signal: null,
npm ERR!   output: null,
npm ERR!   pid: 0,
npm ERR!   stdout: null,
npm ERR!   stderr: null
npm ERR! }
npm ERR!
npm ERR!     at checkExecSyncError (node:child_process:828:11)
npm ERR!     at Object.execFileSync (node:child_process:866:15)
npm ERR!     at validateBinaryVersion (C:\code\b12k\turbo-install\node_modules\turbo\install.js:25:6)
npm ERR!     at C:\code\b12k\turbo-install\node_modules\turbo\install.js:314:5 {
npm ERR!   status: 1,
npm ERR!   signal: null,
npm ERR!   output: [
npm ERR!     null,
npm ERR!     Buffer(0) [Uint8Array] [],
npm ERR!     Buffer(1234) [Uint8Array] [
npm ERR!        67,  58,  92,  99, 111, 100, 101,  92,  98,  49,  50, 107,
npm ERR!        92, 116, 117, 114,  98, 111,  45, 105, 110, 115, 116,  97,
npm ERR!       108, 108,  92, 110, 111, 100, 101,  95, 109, 111, 100, 117,
npm ERR!       108, 101, 115,  92, 116, 117, 114,  98, 111,  92,  98, 105,
npm ERR!       110,  92, 116, 117, 114,  98, 111,  58,  49,  51,  13,  10,
npm ERR!        32,  32,  32,  32, 116, 104, 114, 111, 119,  32, 101,  59,
npm ERR!        13,  10,  32,  32,  32,  32,  94,  13,  10,  13,  10,  60,
npm ERR!       114, 101, 102,  32,  42,  49,  62,  32,  69, 114, 114, 111,
npm ERR!       114,  58,  32, 115,
npm ERR!       ... 1134 more items
npm ERR!     ]
npm ERR!   ],
npm ERR!   pid: 80084,
npm ERR!   stdout: Buffer(0) [Uint8Array] [],
npm ERR!   stderr: Buffer(1234) [Uint8Array] [
npm ERR!      67,  58,  92,  99, 111, 100, 101,  92,  98,  49,  50, 107,
npm ERR!      92, 116, 117, 114,  98, 111,  45, 105, 110, 115, 116,  97,
npm ERR!     108, 108,  92, 110, 111, 100, 101,  95, 109, 111, 100, 117,
npm ERR!     108, 101, 115,  92, 116, 117, 114,  98, 111,  92,  98, 105,
npm ERR!     110,  92, 116, 117, 114,  98, 111,  58,  49,  51,  13,  10,
npm ERR!      32,  32,  32,  32, 116, 104, 114, 111, 119,  32, 101,  59,
npm ERR!      13,  10,  32,  32,  32,  32,  94,  13,  10,  13,  10,  60,
npm ERR!     114, 101, 102,  32,  42,  49,  62,  32,  69, 114, 114, 111,
npm ERR!     114,  58,  32, 115,
npm ERR!     ... 1134 more items
npm ERR!   ]
npm ERR! }

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Bogdan\AppData\Local\npm-cache\_logs\2022-03-25T15_30_06_534Z-debug-0.log
位 npm i turbo@1.2.0-canary.1 -D
npm ERR! code 1
npm ERR! path C:\code\b12k\turbo-install\node_modules\turbo
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node install.js
npm ERR! node:child_process:828
npm ERR!     err = new Error(msg);
npm ERR!           ^
npm ERR!
npm ERR! Error: Command failed: node C:\code\b12k\turbo-install\node_modules\turbo\bin\turbo --version
npm ERR! C:\code\b12k\turbo-install\node_modules\turbo\bin\turbo:13
npm ERR!     throw e;
npm ERR!     ^
npm ERR!
npm ERR! <ref *1> Error: spawnSync C:\code\b12k\turbo-install\node_modules\turbo-windows-64\turbo.exe EPERM
npm ERR!     at Object.spawnSync (node:internal/child_process:1111:20)
npm ERR!     at spawnSync (node:child_process:814:24)
npm ERR!     at Object.execFileSync (node:child_process:860:15)
npm ERR!     at Object.<anonymous> (C:\code\b12k\turbo-install\node_modules\turbo\bin\turbo:6:28)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1103:14)
npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
npm ERR!     at node:internal/main/run_main_module:17:47 {
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'spawnSync C:\\code\\b12k\\turbo-install\\node_modules\\turbo-windows-64\\turbo.exe',
npm ERR!   path: 'C:\\code\\b12k\\turbo-install\\node_modules\\turbo-windows-64\\turbo.exe',
npm ERR!   spawnargs: [ '--version' ],
npm ERR!   error: [Circular *1],
npm ERR!   status: null,
npm ERR!   signal: null,
npm ERR!   output: null,
npm ERR!   pid: 0,
npm ERR!   stdout: null,
npm ERR!   stderr: null
npm ERR! }
npm ERR!
npm ERR!     at checkExecSyncError (node:child_process:828:11)
npm ERR!     at Object.execFileSync (node:child_process:866:15)
npm ERR!     at validateBinaryVersion (C:\code\b12k\turbo-install\node_modules\turbo\install.js:25:6)
npm ERR!     at C:\code\b12k\turbo-install\node_modules\turbo\install.js:314:5 {
npm ERR!   status: 1,
npm ERR!   signal: null,
npm ERR!   output: [
npm ERR!     null,
npm ERR!     Buffer(0) [Uint8Array] [],
npm ERR!     Buffer(1234) [Uint8Array] [
npm ERR!        67,  58,  92,  99, 111, 100, 101,  92,  98,  49,  50, 107,
npm ERR!        92, 116, 117, 114,  98, 111,  45, 105, 110, 115, 116,  97,
npm ERR!       108, 108,  92, 110, 111, 100, 101,  95, 109, 111, 100, 117,
npm ERR!       108, 101, 115,  92, 116, 117, 114,  98, 111,  92,  98, 105,
npm ERR!       110,  92, 116, 117, 114,  98, 111,  58,  49,  51,  13,  10,
npm ERR!        32,  32,  32,  32, 116, 104, 114, 111, 119,  32, 101,  59,
npm ERR!        13,  10,  32,  32,  32,  32,  94,  13,  10,  13,  10,  60,
npm ERR!       114, 101, 102,  32,  42,  49,  62,  32,  69, 114, 114, 111,
npm ERR!       114,  58,  32, 115,
npm ERR!       ... 1134 more items
npm ERR!     ]
npm ERR!   ],
npm ERR!   pid: 39032,
npm ERR!   stdout: Buffer(0) [Uint8Array] [],
npm ERR!   stderr: Buffer(1234) [Uint8Array] [
npm ERR!      67,  58,  92,  99, 111, 100, 101,  92,  98,  49,  50, 107,
npm ERR!      92, 116, 117, 114,  98, 111,  45, 105, 110, 115, 116,  97,
npm ERR!     108, 108,  92, 110, 111, 100, 101,  95, 109, 111, 100, 117,
npm ERR!     108, 101, 115,  92, 116, 117, 114,  98, 111,  92,  98, 105,
npm ERR!     110,  92, 116, 117, 114,  98, 111,  58,  49,  51,  13,  10,
npm ERR!      32,  32,  32,  32, 116, 104, 114, 111, 119,  32, 101,  59,
npm ERR!      13,  10,  32,  32,  32,  32,  94,  13,  10,  13,  10,  60,
npm ERR!     114, 101, 102,  32,  42,  49,  62,  32,  69, 114, 114, 111,
npm ERR!     114,  58,  32, 115,
npm ERR!     ... 1134 more items
npm ERR!   ]
npm ERR! }

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Bogdan\AppData\Local\npm-cache\_logs\2022-03-25T15_31_27_637Z-debug-0.log
位 npm i turbo@1.1.9
npm ERR! code 1
npm ERR! path C:\code\b12k\turbo-install\node_modules\turbo
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node install.js
npm ERR! node:child_process:828
npm ERR!     err = new Error(msg);
npm ERR!           ^
npm ERR!
npm ERR! Error: Command failed: node C:\code\b12k\turbo-install\node_modules\turbo\bin\turbo --version
npm ERR! C:\code\b12k\turbo-install\node_modules\turbo\bin\turbo:13
npm ERR!     throw e;
npm ERR!     ^
npm ERR!
npm ERR! <ref *1> Error: spawnSync C:\code\b12k\turbo-install\node_modules\turbo-windows-64\turbo.exe EPERM
npm ERR!     at Object.spawnSync (node:internal/child_process:1111:20)
npm ERR!     at spawnSync (node:child_process:814:24)
npm ERR!     at Object.execFileSync (node:child_process:860:15)
npm ERR!     at Object.<anonymous> (C:\code\b12k\turbo-install\node_modules\turbo\bin\turbo:6:28)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1103:14)
npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
npm ERR!     at node:internal/main/run_main_module:17:47 {
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'spawnSync C:\\code\\b12k\\turbo-install\\node_modules\\turbo-windows-64\\turbo.exe',
npm ERR!   path: 'C:\\code\\b12k\\turbo-install\\node_modules\\turbo-windows-64\\turbo.exe',
npm ERR!   spawnargs: [ '--version' ],
npm ERR!   error: [Circular *1],
npm ERR!   status: null,
npm ERR!   signal: null,
npm ERR!   output: null,
npm ERR!   pid: 0,
npm ERR!   stdout: null,
npm ERR!   stderr: null
npm ERR! }
npm ERR!
npm ERR!     at checkExecSyncError (node:child_process:828:11)
npm ERR!     at Object.execFileSync (node:child_process:866:15)
npm ERR!     at validateBinaryVersion (C:\code\b12k\turbo-install\node_modules\turbo\install.js:25:6)
npm ERR!     at C:\code\b12k\turbo-install\node_modules\turbo\install.js:314:5 {
npm ERR!   status: 1,
npm ERR!   signal: null,
npm ERR!   output: [
npm ERR!     null,
npm ERR!     Buffer(0) [Uint8Array] [],
npm ERR!     Buffer(1234) [Uint8Array] [
npm ERR!        67,  58,  92,  99, 111, 100, 101,  92,  98,  49,  50, 107,
npm ERR!        92, 116, 117, 114,  98, 111,  45, 105, 110, 115, 116,  97,
npm ERR!       108, 108,  92, 110, 111, 100, 101,  95, 109, 111, 100, 117,
npm ERR!       108, 101, 115,  92, 116, 117, 114,  98, 111,  92,  98, 105,
npm ERR!       110,  92, 116, 117, 114,  98, 111,  58,  49,  51,  13,  10,
npm ERR!        32,  32,  32,  32, 116, 104, 114, 111, 119,  32, 101,  59,
npm ERR!        13,  10,  32,  32,  32,  32,  94,  13,  10,  13,  10,  60,
npm ERR!       114, 101, 102,  32,  42,  49,  62,  32,  69, 114, 114, 111,
npm ERR!       114,  58,  32, 115,
npm ERR!       ... 1134 more items
npm ERR!     ]
npm ERR!   ],
npm ERR!   pid: 40092,
npm ERR!   stdout: Buffer(0) [Uint8Array] [],
npm ERR!   stderr: Buffer(1234) [Uint8Array] [
npm ERR!      67,  58,  92,  99, 111, 100, 101,  92,  98,  49,  50, 107,
npm ERR!      92, 116, 117, 114,  98, 111,  45, 105, 110, 115, 116,  97,
npm ERR!     108, 108,  92, 110, 111, 100, 101,  95, 109, 111, 100, 117,
npm ERR!     108, 101, 115,  92, 116, 117, 114,  98, 111,  92,  98, 105,
npm ERR!     110,  92, 116, 117, 114,  98, 111,  58,  49,  51,  13,  10,
npm ERR!      32,  32,  32,  32, 116, 104, 114, 111, 119,  32, 101,  59,
npm ERR!      13,  10,  32,  32,  32,  32,  94,  13,  10,  13,  10,  60,
npm ERR!     114, 101, 102,  32,  42,  49,  62,  32,  69, 114, 114, 111,
npm ERR!     114,  58,  32, 115,
npm ERR!     ... 1134 more items
npm ERR!   ]
npm ERR! }

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Bogdan\AppData\Local\npm-cache\_logs\2022-03-25T15_31_38_690Z-debug-0.log
位 npm i turbo@1.1.6

added 2 packages, and audited 3 packages in 3s

found 0 vulnerabilities

Expected Behavior

Expected to be installed =)

To Reproduce

On Windows:

  • mkdir test
  • cd test
  • npm init -y
  • npm i turbo -D
@b12k
Copy link
Author

b12k commented Mar 31, 2022

Using node 16 and npm 8.5.5

Output with yarn add turbo -DW

位 yarn add turbo -DW
yarn add v1.22.15
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
info turbo-darwin-64@1.1.10: The platform "win32" is incompatible with this module.
info "turbo-darwin-64@1.1.10" is an optional dependency and failed compatibility check. Excluding it from installation.
info turbo-linux-64@1.1.10: The platform "win32" is incompatible with this module.
info "turbo-linux-64@1.1.10" is an optional dependency and failed compatibility check. Excluding it from installation.
info turbo-darwin-arm64@1.1.10: The platform "win32" is incompatible with this module.
info "turbo-darwin-arm64@1.1.10" is an optional dependency and failed compatibility check. Excluding it from installation.
info turbo-darwin-arm64@1.1.10: The CPU architecture "x64" is incompatible with this module.
info turbo-linux-32@1.1.10: The platform "win32" is incompatible with this module.
info "turbo-linux-32@1.1.10" is an optional dependency and failed compatibility check. Excluding it from installation.
info turbo-linux-32@1.1.10: The CPU architecture "x64" is incompatible with this module.
info turbo-freebsd-64@1.1.10: The platform "win32" is incompatible with this module.
info "turbo-freebsd-64@1.1.10" is an optional dependency and failed compatibility check. Excluding it from installation.info turbo-freebsd-arm64@1.1.10: The platform "win32" is incompatible with this module.
info "turbo-freebsd-arm64@1.1.10" is an optional dependency and failed compatibility check. Excluding it from installation.
info turbo-freebsd-arm64@1.1.10: The CPU architecture "x64" is incompatible with this module.
info turbo-linux-arm@1.1.10: The platform "win32" is incompatible with this module.
info "turbo-linux-arm@1.1.10" is an optional dependency and failed compatibility check. Excluding it from installation.
info turbo-linux-arm@1.1.10: The CPU architecture "x64" is incompatible with this module.
info turbo-linux-ppc64le@1.1.10: The platform "win32" is incompatible with this module.
info "turbo-linux-ppc64le@1.1.10" is an optional dependency and failed compatibility check. Excluding it from installation.
info turbo-linux-ppc64le@1.1.10: The CPU architecture "x64" is incompatible with this module.
info turbo-linux-mips64le@1.1.10: The platform "win32" is incompatible with this module.
info "turbo-linux-mips64le@1.1.10" is an optional dependency and failed compatibility check. Excluding it from installation.
info turbo-linux-mips64le@1.1.10: The CPU architecture "x64" is incompatible with this module.
info turbo-linux-arm64@1.1.10: The platform "win32" is incompatible with this module.
info "turbo-linux-arm64@1.1.10" is an optional dependency and failed compatibility check. Excluding it from installation.
info turbo-linux-arm64@1.1.10: The CPU architecture "x64" is incompatible with this module.
info turbo-windows-32@1.1.10: The CPU architecture "x64" is incompatible with this module.
info "turbo-windows-32@1.1.10" is an optional dependency and failed compatibility check. Excluding it from installation.[3/4] Linking dependencies...
[4/4] Building fresh packages...
error C:\code\tests\turborepo\node_modules\turbo: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: C:\code\tests\turborepo\node_modules\turbo
Output:
[turbo] Failed to find package "turbo-windows-64" on the file system

This can happen if you use the "--no-optional" flag. The "optionalDependencies"
package.json feature is used by turbo to install the correct binary executable
for your current platform. This install script will now attempt to work around
this. If that fails, you need to remove the "--no-optional" flag to use turbo.

node:internal/modules/cjs/loader:933
  const err = new Error(message);
              ^

Error: Cannot find module 'turbo'
Require stack:
- C:\code\tests\turborepo\node_modules\turbo\node-platform.js
- C:\code\tests\turborepo\node_modules\turbo\install.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.resolve (node:internal/modules/cjs/helpers:108:19)
    at downloadedBinPath (C:\code\tests\turborepo\node_modules\turbo\node-platform.js:56:44)
    at checkAndPreparePackage (C:\code\tests\turborepo\node_modules\turbo\install.js:286:15)
    at Object.<anonymous> (C:\code\tests\turborepo\node_modules\turbo\install.js:311:1)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157: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) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\code\\tests\\turborepo\\node_modules\\turbo\\node-platform.js',
    'C:\\code\\tests\\turborepo\\node_modules\\turbo\\install.js'
  ]
}
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

@b12k
Copy link
Author

b12k commented Apr 1, 2022

Issue is not reproducible in 1.2.0-canary.3
Closing.

@b12k b12k closed this as completed Apr 1, 2022
@b12k
Copy link
Author

b12k commented Apr 2, 2022

Issue is again reproducible in 1.2.0-canary.4 and 1.2.0-canary.5

@b12k b12k reopened this Apr 2, 2022
@b12k b12k changed the title Turbo instalation fails on Windows Turbo instalation fails on Windows 馃槬 Apr 2, 2022
@b12k b12k changed the title Turbo instalation fails on Windows 馃槬 馃挜 Turbo instalation fails on Windows 馃槬 Apr 3, 2022
@b12k b12k closed this as completed Apr 8, 2022
@gentarooka
Copy link

Observed the same issue on 1.3.1.

@gentarooka
Copy link

@b12k Hi,
How did you fix this?
any work arrounds would be appreciated.

@b12k
Copy link
Author

b12k commented Jul 19, 2022

@gentarooka For some reasons antivirus was blocking downloads of turbo binaries.

@gentarooka
Copy link

I see. Thank you for sharing your situation :)

@natesilva
Copy link

I鈥檓 having the same issue and don鈥檛 have antivirus installed.

This happens when running npm ci on a Windows system, on a repo that was originally created on a Mac. My guess is that the package-lock.json has turbo-darwin-arm64 instead of turbo-windows-64 (after all that鈥檚 an optional dependency) -- but the install script for turbo expects the platform-specific dependency to be there.

Workaround: Our developers were able to work around this by first running npm i turbo, before running npm ci.

Note: If turbo-windows-64 is available (globally or in the local node_modules) then you don鈥檛 see this error. For example, after running npm i turbo, then package-lock.json will be updated with the platform-specific version of turbo. You need to be in a clean repo that has a package-lock.json built on another platform and no node_modules, and turbo not installed globally.

I believe this may also be an issue if we run turbo in our CI since it鈥檚 yet another platform (Linux ARM64) that is different from our Mac & Windows dev systems. I have not tried that.

PS C:\code\apps-monorepo> npm ci
npm ERR! code 1
npm ERR! path C:\code\apps-monorepo\node_modules\turbo
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node install.js
npm ERR! [turbo] Failed to find package "turbo-windows-64" on the file system
npm ERR!
npm ERR! This can happen if you use the "--no-optional" flag. The "optionalDependencies"
npm ERR! package.json feature is used by turbo to install the correct binary executable
npm ERR! for your current platform. This install script will now attempt to work around
npm ERR! this. If that fails, you need to remove the "--no-optional" flag to use turbo.
npm ERR!
npm ERR! node:internal/modules/cjs/loader:956
npm ERR!   const err = new Error(message);
npm ERR!               ^
npm ERR!
npm ERR! Error: Cannot find module 'turbo'
npm ERR! Require stack:
npm ERR! - C:\code\apps-monorepo\node_modules\turbo\node-platform.js
npm ERR! - C:\code\apps-monorepo\node_modules\turbo\install.js
npm ERR!     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)
npm ERR!     at Function.resolve (node:internal/modules/cjs/helpers:108:19)
npm ERR!     at downloadedBinPath (C:\code\apps-monorepo\node_modules\turbo\node-platform.js:52:44)
npm ERR!     at checkAndPreparePackage (C:\code\apps-monorepo\node_modules\turbo\install.js:277:15)
npm ERR!     at Object.<anonymous> (C:\code\apps-monorepo\node_modules\turbo\install.js:302:1)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1126:14)
npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:1004:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:839:12)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
npm ERR!   code: 'MODULE_NOT_FOUND',
npm ERR!   requireStack: [
npm ERR!     'C:\\code\\apps-monorepo\\node_modules\\turbo\\node-platform.js',
npm ERR!     'C:\\code\\apps-monorepo\\node_modules\\turbo\\install.js'
npm ERR!   ]
npm ERR! }

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\nate\AppData\Local\npm-cache\_logs\2022-08-23T18_31_16_387Z-debug-0.log
PS C:\code\apps-monorepo>

@natesilva
Copy link

Since this thread is closed, do maintainers want me to open a new issue, or re-open this thread?

@mehulkar
Copy link
Contributor

@natesilva let's open a new issue please! (you can reference this)

@Fumarie
Copy link

Fumarie commented Oct 12, 2022

Same issue, cant install turbo in docker container on windows

@MathieuDoyon
Copy link

MathieuDoyon commented Oct 13, 2022

same can't install in docker on macos.

I roll back and use lock version to 1.2.4 in Dockerfile and package.json

{
    "devDependencies": {
        "turbo": "1.2.4"
    },
}

Dockerfile

RUN yarn global add turbo@1.2.4

@chrisbeaver
Copy link

This is breaking my Docker container in VSCode now as well.

@maanex
Copy link

maanex commented Oct 13, 2022

Broke with Github Actions too. Fixed by locking my versions in to 1.4.3 in both the package.json as well as my Dockerfiles

@chrisbeaver
Copy link

chrisbeaver commented Oct 13, 2022

The fix for Docker I found on another issue, but you just need to install a library before pulling in the package with yarn.

RUN apk add --no-cache libc6-compat

Adding that line in my Dockerfile above my yarn install resolved the issue with turbo, I'll credit whoever found this if I can find it.

I'm building image FROM node:lts-alpine

SOURCE: #2198 (comment)

@a-stanisz
Copy link

@chrisbeaver, having a related issue already, I did include this installation. However, I've just realized that it needs to be done for each stage when using a multistage docker build. Thanks!

@nathanhammond
Copy link
Contributor

Hi everybody, I'm locking this issue so that we're better able to track what is going on. If you encounter something similar please open a new issue. Even if somebody else has already reported an issue that seems related, please open a new issue.

In that issue, please describe your setup. The things that will matter the most:

  • What environment are you seeing this in? (CI, development box).
  • What operating system is that box running?
  • What device generated the lockfile? What is the OS?
  • Are you using Docker?
  • What package manager are you using?
  • What version of turbo?

As part of your debugging steps you should run these before running your install.

  • npm cache clean --force
  • yarn cache clean
  • rm -rf ${pnpm store path}

If you're seeing the issue in CI you should make sure that there is no build cache which is contributing.

Finally, please paste your entire lockfile into a gist and include it in the thread so that we're able to understand what is happening.


In most cases this is unlikely to be a turbo problem, and instead be a problem with the way the package manager is running the installation. We're happy to help you resolve the issue, but we need this information to do so.

Thanks for opening new issues!

@vercel vercel locked and limited conversation to collaborators Oct 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants