Skip to content
This repository was archived by the owner on Oct 5, 2022. It is now read-only.

Bumped up the 'electron-builder' version #320

Merged
merged 1 commit into from
Mar 19, 2020
Merged

Bumped up the 'electron-builder' version #320

merged 1 commit into from
Mar 19, 2020

Conversation

kittaakos
Copy link
Contributor

Closes #319

I have verified it locally, it builds and runs.

Upstream ref: electron-userland/electron-builder#3990 (comment)

Signed-off-by: Akos Kitta [email protected]

@marcdumais-work
Copy link
Member

Hi @kittaakos ,

I built on Ubuntu 18.04 and got the following error when I tried to start the AppImage package:

theia-apps/theia-electron/dist$ ./Theia-0.1.0.AppImage 
Failed to start the backend application.
{ Error: Cannot find module 'fs-extra'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:584:15)
    at Function.Module._load (internal/modules/cjs/loader.js:510:25)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/tmp/.mount_Theia-iwXxfv/resources/app/node_modules/@theia/filesystem/lib/node/node-filesystem.js:94:10)
    at Object.<anonymous> (/tmp/.mount_Theia-iwXxfv/resources/app/node_modules/@theia/filesystem/lib/node/node-filesystem.js:980:3)
    at Module._compile (internal/modules/cjs/loader.js:693:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12) code: 'MODULE_NOT_FOUND' }
/tmp/.mount_Theia-iwXxfv/resources/app/node_modules/@theia/core/lib/node/main.js:56
    throw reason;
    ^

Error: Cannot find module 'fs-extra'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:584:15)
    at Function.Module._load (internal/modules/cjs/loader.js:510:25)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/tmp/.mount_Theia-iwXxfv/resources/app/node_modules/@theia/filesystem/lib/node/node-filesystem.js:94:10)
    at Object.<anonymous> (/tmp/.mount_Theia-iwXxfv/resources/app/node_modules/@theia/filesystem/lib/node/node-filesystem.js:980:3)
    at Module._compile (internal/modules/cjs/loader.js:693:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)

@kittaakos
Copy link
Contributor Author

Thanks for trying it out, I have cheated a bit and opened the app from ./dist/mac/Theia.app/Contents/MacOS/Theia. I did not install it to Applications. Just a guess, but I think a good one; we hit this issue. I will add a patch soon.

Also pinned 'fs-extra' version.

Closes #319

Signed-off-by: Akos Kitta <[email protected]>
@kittaakos
Copy link
Contributor Author

Please try again. Now I installed the app and it works here.

"bufferutil": "4",
"utf-8-validate": "5"
},
"// Notes:": [
"The resolution for `fs-extra` was required due to this: https://spectrum.chat/theia/general/our-theia-electron-builder-app-no-longer-starts~f5cf09a0-6d88-448b-8818-24ad0ec2ee7c"
],
"resolutions": {
"vscode-languageserver-protocol": "3.15.0-next.9",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have an application for JAVA and the section "resolutions" is not needed anymore with the latest Theia. In here we still need the fs-extra only

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we added the resolutions to all apps in this repo - maybe better to remove them all in one shot as well vs piecemeal?

@marcdumais-work
Copy link
Member

Please try again. Now I installed the app and it works here.

Works now 👍

@marcdumais-work
Copy link
Member

cc: @marechal-p : FYI, I think the problem with fs-extra, now gone in this iteration of the PR, may be related to your recent investigation about implicit npm dependencies. (original commit)

theia-apps/theia-electron$ yarn why fs-extra
yarn why v1.17.3
[1/4] Why do we have the module "fs-extra"...?
[2/4] Initialising dependency graph...
warning Resolution field "[email protected]" is incompatible with requested version "vscode-languageserver@^6.0.1"
warning Resolution field "[email protected]" is incompatible with requested version "vscode-languageserver-types@^3.15.1"
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "[email protected]"
info Has been hoisted to "fs-extra"
info Reasons this module exists
   - Hoisted from "electron-builder#fs-extra"
   - Hoisted from "electron-builder#dmg-builder#fs-extra"
   - Hoisted from "electron-builder#app-builder-lib#fs-extra"
   - Hoisted from "electron-builder#read-config-file#fs-extra"
   - Hoisted from "electron-builder#builder-util#fs-extra"
   - Hoisted from "@theia#cli#@theia#application-manager#electron-rebuild#fs-extra"
   - Hoisted from "electron-builder#app-builder-lib#temp-file#fs-extra"
   - Hoisted from "electron-builder#app-builder-lib#electron-publish#fs-extra"
info Disk size without dependencies: "284KB"
info Disk size with unique dependencies: "376KB"
info Disk size with transitive dependencies: "376KB"
info Number of shared dependencies: 3
=> Found "@theia/core#[email protected]"
info This module exists because "@theia#core" depends on it.
info Disk size without dependencies: "388KB"
info Disk size with unique dependencies: "480KB"
info Disk size with transitive dependencies: "480KB"
info Number of shared dependencies: 3
=> Found "trash#[email protected]"
info This module exists because "@theia#filesystem#trash" depends on it.
info Disk size without dependencies: "248KB"
info Disk size with unique dependencies: "404KB"
info Disk size with transitive dependencies: "688KB"
info Number of shared dependencies: 12
=> Found "electron-download#[email protected]"
info This module exists because "@theia#electron#electron-download" depends on it.
info Disk size without dependencies: "388KB"
info Disk size with unique dependencies: "480KB"
info Disk size with transitive dependencies: "480KB"
info Number of shared dependencies: 3
=> Found "@theia/application-package#[email protected]"
info This module exists because "@theia#cli#@theia#application-package" depends on it.
info Disk size without dependencies: "388KB"
info Disk size with unique dependencies: "480KB"
info Disk size with transitive dependencies: "480KB"
info Number of shared dependencies: 3
=> Found "@theia/application-manager#[email protected]"
info This module exists because "@theia#cli#@theia#application-manager" depends on it.
info Disk size without dependencies: "388KB"
info Disk size with unique dependencies: "480KB"
info Disk size with transitive dependencies: "480KB"
info Number of shared dependencies: 3
=> Found "nsfw#[email protected]"
info This module exists because "@theia#core#nsfw" depends on it.
info Disk size without dependencies: "264KB"
info Disk size with unique dependencies: "356KB"
info Disk size with transitive dependencies: "356KB"
info Number of shared dependencies: 3
Done in 1.46s.

In the current iteration (with fs-extra pinned in resolutions block), we get:

theia-apps/theia-electron$ yarn why fs-extra
yarn why v1.17.3
[1/4] Why do we have the module "fs-extra"...?
[2/4] Initialising dependency graph...
warning Resolution field "[email protected]" is incompatible with requested version "vscode-languageserver@^6.0.1"
warning Resolution field "[email protected]" is incompatible with requested version "vscode-languageserver-types@^3.15.1"
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "[email protected]"
info Reasons this module exists
   - "@theia#core" depends on it
   - Hoisted from "@theia#core#fs-extra"
   - Hoisted from "electron-builder#fs-extra"
   - Hoisted from "@theia#filesystem#trash#fs-extra"
   - Hoisted from "@theia#electron#electron-download#fs-extra"
   - Hoisted from "@theia#cli#@theia#application-package#fs-extra"
   - Hoisted from "@theia#cli#@theia#application-manager#fs-extra"
   - Hoisted from "@theia#core#nsfw#fs-extra"
   - Hoisted from "electron-builder#builder-util#fs-extra"
   - Hoisted from "electron-builder#dmg-builder#fs-extra"
   - Hoisted from "electron-builder#read-config-file#fs-extra"
   - Hoisted from "electron-builder#app-builder-lib#fs-extra"
   - Hoisted from "@theia#cli#@theia#application-manager#electron-rebuild#fs-extra"
   - Hoisted from "electron-builder#app-builder-lib#electron-publish#fs-extra"
   - Hoisted from "electron-builder#app-builder-lib#temp-file#fs-extra"
info Disk size without dependencies: "388KB"
info Disk size with unique dependencies: "480KB"
info Disk size with transitive dependencies: "480KB"
info Number of shared dependencies: 3
Done in 1.73s.

Copy link
Member

@marcdumais-work marcdumais-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @kittaakos

@marcdumais-work
Copy link
Member

marcdumais-work commented Mar 18, 2020

Just a guess, but I think a good one; we hit this issue. I will add a patch soon.

Indeed, the output from yarn list looks almost identical to what I got

@kittaakos kittaakos merged commit 0cc6a3d into master Mar 19, 2020
@kittaakos kittaakos deleted the GH-319 branch March 19, 2020 08:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[electron] I cannot build the Theia electron app
3 participants