Theia: Example from docs is not working

Created on 14 Dec 2020  路  4Comments  路  Source: eclipse-theia/theia

Bug Description:

I am trying to follow the tutorial from https://theia-ide.org/docs/composing_applications/, but it's not working.

Steps to Reproduce:

  1. Create package.json with
{
  "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"
  }
}

  1. run yarn
  2. run yarn theia build
  3. Errors
    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)

image

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?

Additional Information

  • Operating System: Mac 10.15.7, ubuntu 20
  • Theia Version: next
bug dependencies

Most helpful comment

@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"
  }

All 4 comments

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 upgrade leads 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"
  }
Was this page helpful?
0 / 5 - 0 ratings

Related issues

pwFoo picture pwFoo  路  3Comments

akosyakov picture akosyakov  路  3Comments

akosyakov picture akosyakov  路  3Comments

fangnx picture fangnx  路  3Comments

cekvenich picture cekvenich  路  3Comments