Failed to resolve module: @theia/electron

this is error log.
#13 300.4 warning “@theia/debug > requestretry@7.1.0” has unmet peer dependency “request@2..”.
#13 300.4 warning “@theia/debug > @theia/process > node-pty@0.11.0-beta17” has unmet peer dependency “node-gyp@^8.3.0”.
#13 300.4 warning “@theia/messages > react-perfect-scrollbar@1.5.8” has unmet peer dependency “react@>=16.3.3”.
#13 300.4 warning “@theia/messages > react-perfect-scrollbar@1.5.8” has unmet peer dependency “react-dom@>=16.3.3”.
#13 300.4 warning “@theia/plugin-ext > @theia/scm > react-autosize-textarea@7.1.0” has unmet peer dependency “react@^0.14.0 || ^15.0.0 || ^16.0.0”.
#13 300.4 warning “@theia/plugin-ext > @theia/scm > react-autosize-textarea@7.1.0” has unmet peer dependency “react-dom@^0.14.0 || ^15.0.0 || ^16.0.0”.
#13 304.8 [4/4] Building fresh packages…
#13 398.7 Done in 398.45s.
#13 398.9 yarn run v1.22.5
#13 398.9 $ /home/theia/node_modules/.bin/theia build
#13 399.4 Failed to resolve module: @theia/electron
#13 412.8 Error: webpack exited with an unexpected signal: SIGKILL.
#13 412.8 at ChildProcess. (/home/theia/node_modules/@theia/application-manager/lib/application-process.js:59:28)
#13 412.8 at ChildProcess.emit (events.js:400:28)
#13 412.8 at maybeClose (internal/child_process.js:1058:16)
#13 412.8 at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
#13 413.6 error Command failed with exit code 1.

this is package.json
{
“private”: true,
“theia”: {
“frontend”: {
“config”: {
“applicationName”: “Theia Multi-Language Example”,
“preferences”: {
“files.enableTrash”: false,
“ruby.useLanguageServer”: true,
“php.suggest.basic”: false
}
}
}
},
“dependencies”: {
@theia/callhierarchy”: “1.34.0”,
@theia/console”: “1.34.0”,
@theia/core”: “1.34.0”,
@theia/debug”: “1.34.0”,
@theia/editor”: “1.34.0”,
@theia/editor-preview”: “1.34.0”,
@theia/file-search”: “1.34.0”,
@theia/filesystem”: “1.34.0”,
@theia/getting-started”: “1.34.0”,
@theia/keymaps”: “1.34.0”,
@theia/markers”: “1.34.0”,
@theia/messages”: “1.34.0”,
@theia/metrics”: “1.34.0”,
@theia/monaco”: “1.34.0”,
@theia/navigator”: “1.34.0”,
@theia/outline-view”: “1.34.0”,
@theia/output”: “1.34.0”,
@theia/plugin”: “1.34.0”,
@theia/plugin-ext”: “1.34.0”,
@theia/plugin-ext-vscode”: “1.34.0”,
@theia/preferences”: “1.34.0”,
@theia/process”: “1.34.0”,
@theia/scm”: “1.34.0”,
@theia/search-in-workspace”: “1.34.0”,
@theia/task”: “1.34.0”,
@theia/terminal”: “1.34.0”,
@theia/typehierarchy”: “1.34.0”,
@theia/userstorage”: “1.34.0”,
@theia/variable-resolver”: “1.34.0”,
@theia/vsx-registry”: “1.34.0”,
@theia/workspace”: “1.34.0”
},
“devDependencies”: {
@theia/cli”: “1.34.0”
},
“scripts”: {
“preinstall”: “node-gyp install”
},
“theiaPluginsDir”: “plugins”,
}

i delete theia plugin,because i can’t add three link.

Hey @zbm0711,

This is the actual error that prevents the build from successfully finishing, the Failed to resolve module: @theia/electron is just an unrelated warning (though I’m suprised that it appears at all).

The webpack error only occurs if you don’t have enough memory available to build Theia. Due to it’s relatively large codebase, Theia requires roughly 3GB of memory to build. Do you have that much available on your machine/docker image? Otherwise you can manually increase the memory allowed to be used by the node process by using the --max-old-space-size=8192 argument, which increases the memory to 8GB.

1 Like

Problem solved, thanks for help.

Hi,
where did you set --max-old-space-size=8192 in your project? is it in project.json? could you give me a little code snap, I have the same memory problem

@wss It’s supposed to be used as an argument for the yarn process.