I am trying to follow the tutorial from https://theia-ide.org/docs/composing_applications/, but it's not working.
{
"private": true,
"dependencies": {
"@theia/callhierarchy": "next",
"@theia/file-search": "next",
"@theia/git": "next",
"@theia/markers": "next",
"@theia/messages": "next",
"@theia/mini-browser": "next",
"@theia/navigator": "next",
"@theia/outline-view": "next",
"@theia/plugin-ext-vscode": "next",
"@theia/preferences": "next",
"@theia/preview": "next",
"@theia/search-in-workspace": "next",
"@theia/terminal": "next"
},
"devDependencies": {
"@theia/cli": "next"
}
}
yarnyarn theia build ERROR in ./node_modules/@theia/plugin-ext/lib/common/plugin-message-reader.js
Module not found: Error: Can't resolve 'vscode-jsonrpc/lib/messageReader' in '/Users/sky/work/fullstack/theia/node_modules/@theia/plugin-ext/lib/common'
@ ./node_modules/@theia/plugin-ext/lib/common/plugin-message-reader.js 33:22-65
@ ./node_modules/@theia/plugin-ext/lib/plugin/connection-ext.js
@ ./node_modules/@theia/plugin-ext/lib/plugin/plugin-context.js
@ ./node_modules/source-map-loader!./node_modules/@theia/plugin-ext/lib/hosted/browser/worker/worker-main.js
ERROR in ./node_modules/@theia/plugin-ext/lib/common/plugin-message-writer.js
Module not found: Error: Can't resolve 'vscode-jsonrpc/lib/messageWriter' in '/Users/sky/work/fullstack/theia/node_modules/@theia/plugin-ext/lib/common'
@ ./node_modules/@theia/plugin-ext/lib/common/plugin-message-writer.js 33:22-65
@ ./node_modules/@theia/plugin-ext/lib/plugin/connection-ext.js
@ ./node_modules/@theia/plugin-ext/lib/plugin/plugin-context.js
@ ./node_modules/source-map-loader!./node_modules/@theia/plugin-ext/lib/hosted/browser/worker/worker-main.js
Error: webpack exited with an unexpected code: 2.
at ChildProcess.<anonymous> (/Users/sky/work/fullstack/theia/node_modules/@theia/application-manager/lib/application-process.js:67:28)
at ChildProcess.emit (events.js:314:20)
at maybeClose (internal/child_process.js:1021:16)
at Socket.<anonymous> (internal/child_process.js:443:11)
at Socket.emit (events.js:314:20)
at Pipe.<anonymous> (net.js:676:12)

vscode-jsonrpc/lib/messageReader and vscode-jsonrpc/lib/messageWriter don't exist.
vscode-jsonrpc 6.0.0 was published 9h ago. Maybe some dependencies are broken?
It looks like there are some breaking changes associated with the recent update to vscode-jsonrpc.
We will need to perform a yarn upgrade on the framework (and fix any issues), but for the meantime you can pin the dependency with a resolution to a previous version or use a copy of the yarn.lock present in the repo.
I have the same issue on Ubuntu 18.04. yarn upgrade leads to the same error.
I have the same issue on Ubuntu 18.04.
yarn upgradeleads to the same error.
@renardeinside as mentioned in the following https://github.com/eclipse-theia/theia/issues/8862#issuecomment-744761863, you should use yarn resolutions in your application to pin the dependency to a proper version until a proper fix is introduced, else you can make use of this repository's yarn.lock.
@vince-fugnitto , oh sorry, I misunderstood your previous message.
This set of resolutions fixed the build for me:
"resolutions": {
"vscode-jsonrpc": "5.0.1",
"vscode-languageserver-protocol": "3.15.3"
}
Most helpful comment
@vince-fugnitto , oh sorry, I misunderstood your previous message.
This set of resolutions fixed the build for me: