theia: Cannot build on Windows

Bug Description:

When using the build instructions for Windows (https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#building-on-windows), the procedure fails at the step after cloning the repository:

git clone https://github.com/eclipse-theia/theia.git \
    && cd theia \
    && yarn \      <-   HERE IS WHERE THE ERROR OCCURS
    && yarn browser build \
    && yarn browser start

with this error:

...
[4/5] Linking dependencies...
warning " > @theia/electron@1.48.0" has unmet peer dependency "electron@^23.2.4".
warning "workspace-aggregator-be564bbb-db96-49b8-a062-2948397d5c8d > @theia/messages > react-perfect
-scrollbar@1.5.8" has unmet peer dependency "react@>=16.3.3".
warning "workspace-aggregator-be564bbb-db96-49b8-a062-2948397d5c8d > @theia/messages > react-perfect
-scrollbar@1.5.8" has unmet peer dependency "react-dom@>=16.3.3".
warning "workspace-aggregator-be564bbb-db96-49b8-a062-2948397d5c8d > @theia/preview > markdown-it-an
chor@5.0.2" has unmet peer dependency "markdown-it@^8.4.1".
warning "workspace-aggregator-be564bbb-db96-49b8-a062-2948397d5c8d > @theia/process > node-pty@0.11.
0-beta17" has incorrect peer dependency "node-gyp@^8.3.0".
warning "workspace-aggregator-be564bbb-db96-49b8-a062-2948397d5c8d > @theia/scm > react-autosize-tex
tarea@7.1.0" has unmet peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning "workspace-aggregator-be564bbb-db96-49b8-a062-2948397d5c8d > @theia/scm > react-autosize-tex
tarea@7.1.0" has unmet peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16.0.0".
[5/5] Building fresh packages...
[10/19] ⢀ drivelist
[11/19] ⢀ keytar
[13/19] ⢀ node-pty
[9/19] ⢀ native-keymap
error E:\NodeJS\theia\node_modules\node-pty: Command failed.
Exit code: 1
Command: node scripts/install.js
Arguments:
Directory: E:\NodeJS\theia\node_modules\node-pty
Output:
node:internal/child_process:421
    throw new ErrnoException(err, 'spawn');
    ^

Error: spawn EINVAL
    at ChildProcess.spawn (node:internal/child_process:421:11)
    at spawn (node:child_process:761:9)
    at Object.<anonymous> (E:\NodeJS\theia\node_modules\node-pty\scripts\install.js:11:20)
    at Module._compile (node:internal/modules/cjs/loader:1369:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49 {
  errno: -4071,
  code: 'EINVAL',
  syscall: 'spawn'

Steps to Reproduce:

  1. Follow the procedure described at: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#building-on-windows

Additional Information

  • Operating System: Windows 10 x64
  • Theia Version: Development (cloned from Github)

About this issue

  • Original URL
  • State: closed
  • Created 3 months ago
  • Reactions: 1
  • Comments: 17 (10 by maintainers)

Most upvoted comments

For what it’s worth, I just got the following on a Build and Test (windows-2019, node-18.x) PR-check job:

[3/5] Fetching packages...
warning plugin-a@1.48.0: The engine "vscode" appears to be invalid.
warning plugin-b@1.48.0: The engine "vscode" appears to be invalid.
warning plugin-gotd@1.48.0: The engine "vscode" appears to be invalid.
[4/5] Linking dependencies...
warning " > @theia/electron@1.48.0" has unmet peer dependency "electron@^23.2.4".
warning "workspace-aggregator-f335d5e4-b98c-45d1-a7c9-6b7bf63ec5ef > @theia/messages > react-perfect-scrollbar@1.5.8" has unmet peer dependency "react@>=16.3.3".
warning "workspace-aggregator-f335d5e4-b98c-45d1-a7c9-6b7bf63ec5ef > @theia/messages > react-perfect-scrollbar@1.5.8" has unmet peer dependency "react-dom@>=16.3.3".
warning "workspace-aggregator-f335d5e4-b98c-45d1-a7c9-6b7bf63ec5ef > @theia/preview > markdown-it-anchor@5.0.2" has unmet peer dependency "markdown-it@^8.4.1".
warning "workspace-aggregator-f335d5e4-b98c-45d1-a7c9-6b7bf63ec5ef > @theia/process > node-pty@0.11.0-beta17" has incorrect peer dependency "node-gyp@^8.3.0".
warning "workspace-aggregator-f335d5e4-b98c-45d1-a7c9-6b7bf63ec5ef > @theia/scm > react-autosize-textarea@7.1.0" has unmet peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning "workspace-aggregator-f335d5e4-b98c-45d1-a7c9-6b7bf63ec5ef > @theia/scm > react-autosize-textarea@7.1.0" has unmet peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16.0.0".
[5/5] Building fresh packages...
error D:\a\theia\theia\node_modules\node-pty: Command failed.
Exit code: 1
Command: node scripts/install.js
Arguments: 
Directory: D:\a\theia\theia\node_modules\node-pty
Output:
node:internal/child_process:414
    throw errnoException(err, 'spawn');
    ^

Error: spawn EINVAL
    at ChildProcess.spawn (node:internal/child_process:414:11)
    at spawn (node:child_process:761:9)
    at Object.<anonymous> (D:\a\theia\theia\node_modules\node-pty\scripts\install.js:11:20)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Module._load (node:internal/modules/cjs/loader:1019:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
    at node:internal/main/run_main_module:28:49 {
  errno: -4071,
  code: 'EINVAL',
  syscall: 'spawn'
}

Node.js v18.20.2
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Process completed with exit code 1.

@matkuki Windows Build Tools are now atuomatically installed with node.js. No need to install them manually anymore. Our documentation says so as well.