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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run theia for the first time #6370

Closed
cortopy opened this issue Oct 11, 2019 · 4 comments
Closed

Unable to run theia for the first time #6370

cortopy opened this issue Oct 11, 2019 · 4 comments
Labels
question user / developer questions theia-cli issues related to the theia-cli

Comments

@cortopy
Copy link
Contributor

cortopy commented Oct 11, 2019

Description

This is a newcomer here. I really like the Docker version but I'm unable to run from source.

When I try to run the suggested instructions for the browser I get the following error:

Error: Cannot find module '../lib/theia'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/user/theia/dev-packages/cli/bin/theia:2:1)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
error Command failed with exit code 1.

I've looked in the dev-packages and I can see the cli is just an import for ../lib/theia but I just don't know where that lib directory is.

I've also tried to run yarn build in case that directory is generated at build time, but this command also returns an error:

{ Error: Command failed: yarn run build
error An unexpected error occurred: "spawn ENOMEM".

$ theiaext build
info If you think this is a bug, please open a bug report with the information provided in "/home/user/theia/packages/output/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

    at Promise.all.then.arr (/home/user/theia/node_modules/execa/index.js:236:11)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  code: 1,
  killed: false,
  stdout:
   '$ theiaext build\ninfo If you think this is a bug, please open a bug report with the information provided in "/home/user/theia/packages/output/yarn-error.log".\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\n',
  stderr: 'error An unexpected error occurred: "spawn ENOMEM".\n',
  failed: true,
  signal: null,
  cmd: 'yarn run build',
  timedOut: false,
  exitCode: 1 }
error Command failed with exit code 1.

Reproduction Steps

  1. Run the commands for the browser in docs
  2. Run yarn build

OS and Theia version:
Ubuntu
Theia master branch

@akosyakov akosyakov added question user / developer questions theia-cli issues related to the theia-cli labels Oct 13, 2019
@akosyakov
Copy link
Member

An unexpected error occurred: "spawn ENOMEM".

Maybe you don't have enough memory, try with --max_old_space_size=4096. You could set as env variable for Node.js: export NODE_OPTIONS=--max_old_space_size=4096

@cortopy
Copy link
Contributor Author

cortopy commented Oct 24, 2019

I was getting more errors, but all resolved now

@cortopy cortopy closed this as completed Oct 24, 2019
@rytina
Copy link

rytina commented Jun 7, 2020

Hi, I am also a newcomer...how did you resolved the Error: Cannot find module '../lib/theia'
Getting the same error

@akosyakov
Copy link
Member

@rytina Look you are hitting #7974 We will look into resolving it today. You can use latest tag instead as a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question user / developer questions theia-cli issues related to the theia-cli
Projects
None yet
Development

No branches or pull requests

3 participants