theia-ide / theia-apps

Theia applications examples - docker images, desktop apps, packagings
Apache License 2.0
1.04k stars 345 forks source link

Cannot build the electron app #435

Closed kittaakos closed 3 years ago

kittaakos commented 3 years ago
error dugite-extra@0.1.12: The engine "node" is incompatible with this module. Expected version ">=10.11.0 <12". Got "12.14.1"
kittaakos commented 3 years ago

It does not work with Node.js 10.x either:

akos.kitta@Akoss-MacBook-Pro theia-electron % nvm use 10
Now using node v10.16.3 (npm v6.9.0)
akos.kitta@Akoss-MacBook-Pro theia-electron % yarn
yarn install v1.22.4
[1/5] 🔍  Validating package.json...
error theia-electron-example@1.2.0: The engine "node" is incompatible with this module. Expected version ">=12.14.1 <13". Got "10.16.3"
error Found incompatible module.
vince-fugnitto commented 3 years ago

@kittaakos do you have any additional information that may help, I was able to successfully build and package theia-electron on Linux:

![image](https://user-images.githubusercontent.com/40359487/98019681-0dfcb380-1dd0-11eb-89ed-e71d011779bb.png)

Additional Info:

kittaakos commented 3 years ago

do you have any additional information that may help

Here is the full console output with the versions, and the commit ref:

% node --version && yarn --version && git rev-parse --short HEAD && yarn
v12.14.1
1.22.4
1df3ba2
yarn install v1.22.4
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
warning Lockfile has incorrect entry for "vscode-languageserver-protocol@^3.15.3". Ignoring it.
[3/5] 🚚  Fetching packages...
warning Pattern ["@theia/core@latest"] is trying to unpack in the same destination "/Users/akos.kitta/Library/Caches/Yarn/v6/npm-@theia-core-1.3.0-d352301121fd7bb40724eaa5e6279265cfaadcf0-integrity/node_modules/@theia/core" as pattern ["@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0","@theia/core@^1.3.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["@theia/editor@latest"] is trying to unpack in the same destination "/Users/akos.kitta/Library/Caches/Yarn/v6/npm-@theia-editor-1.3.0-9252b30dc4e9408a45f3daba8b57bad400fe9a55-integrity/node_modules/@theia/editor" as pattern ["@theia/editor@^1.3.0","@theia/editor@^1.3.0","@theia/editor@^1.3.0","@theia/editor@^1.3.0","@theia/editor@^1.3.0","@theia/editor@^1.3.0","@theia/editor@^1.3.0","@theia/editor@^1.3.0","@theia/editor@^1.3.0","@theia/editor@^1.3.0","@theia/editor@^1.3.0","@theia/editor@^1.3.0","@theia/editor@^1.3.0","@theia/editor@^1.3.0","@theia/editor@^1.3.0","@theia/editor@^1.3.0","@theia/editor@^1.3.0","@theia/editor@^1.3.0","@theia/editor@^1.3.0","@theia/editor@^1.3.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["@theia/filesystem@latest"] is trying to unpack in the same destination "/Users/akos.kitta/Library/Caches/Yarn/v6/npm-@theia-filesystem-1.3.0-a41fb3c76feb3ebdd2de42777bed8d26151e9b29-integrity/node_modules/@theia/filesystem" as pattern ["@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0","@theia/filesystem@^1.3.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["@theia/keymaps@latest"] is trying to unpack in the same destination "/Users/akos.kitta/Library/Caches/Yarn/v6/npm-@theia-keymaps-1.3.0-a99f210005b01c2ed9dc1f258db944243b819f94-integrity/node_modules/@theia/keymaps" as pattern ["@theia/keymaps@^1.3.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["@theia/markers@latest"] is trying to unpack in the same destination "/Users/akos.kitta/Library/Caches/Yarn/v6/npm-@theia-markers-1.3.0-a4a054d7b2a2d7fbf508677dddece1c0f428eea4-integrity/node_modules/@theia/markers" as pattern ["@theia/markers@^1.3.0","@theia/markers@^1.3.0","@theia/markers@^1.3.0","@theia/markers@^1.3.0","@theia/markers@^1.3.0","@theia/markers@^1.3.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["@theia/monaco@latest"] is trying to unpack in the same destination "/Users/akos.kitta/Library/Caches/Yarn/v6/npm-@theia-monaco-1.3.0-6f8d8db10dbe1607658f40d6e28a8e3c82b0cd37-integrity/node_modules/@theia/monaco" as pattern ["@theia/monaco@^1.3.0","@theia/monaco@^1.3.0","@theia/monaco@^1.3.0","@theia/monaco@^1.3.0","@theia/monaco@^1.3.0","@theia/monaco@^1.3.0","@theia/monaco@^1.3.0","@theia/monaco@^1.3.0","@theia/monaco@^1.3.0","@theia/monaco@^1.3.0","@theia/monaco@^1.3.0","@theia/monaco@^1.3.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["@theia/navigator@latest"] is trying to unpack in the same destination "/Users/akos.kitta/Library/Caches/Yarn/v6/npm-@theia-navigator-1.3.0-f48c35fabb6d7620b3718b6931cf7020f77c7f29-integrity/node_modules/@theia/navigator" as pattern ["@theia/navigator@^1.3.0","@theia/navigator@^1.3.0","@theia/navigator@^1.3.0","@theia/navigator@^1.3.0","@theia/navigator@^1.3.0","@theia/navigator@^1.3.0","@theia/navigator@^1.3.0","@theia/navigator@^1.3.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["@theia/outline-view@latest"] is trying to unpack in the same destination "/Users/akos.kitta/Library/Caches/Yarn/v6/npm-@theia-outline-view-1.3.0-834e6af5a42ec083d6ee1ce34ad866b3e2540f96-integrity/node_modules/@theia/outline-view" as pattern ["@theia/outline-view@^1.3.0","@theia/outline-view@^1.3.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["@theia/preferences@latest"] is trying to unpack in the same destination "/Users/akos.kitta/Library/Caches/Yarn/v6/npm-@theia-preferences-1.3.0-8b7fd9787af3b45c372312c3b52fb7d45f9295a7-integrity/node_modules/@theia/preferences" as pattern ["@theia/preferences@^1.3.0","@theia/preferences@^1.3.0","@theia/preferences@^1.3.0","@theia/preferences@^1.3.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["@theia/process@latest"] is trying to unpack in the same destination "/Users/akos.kitta/Library/Caches/Yarn/v6/npm-@theia-process-1.3.0-3ca76c00207eb6cceb29d65198b65c401976057f-integrity/node_modules/@theia/process" as pattern ["@theia/process@^1.3.0","@theia/process@^1.3.0","@theia/process@^1.3.0","@theia/process@^1.3.0","@theia/process@^1.3.0","@theia/process@^1.3.0","@theia/process@^1.3.0","@theia/process@^1.3.0","@theia/process@^1.3.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["@theia/search-in-workspace@latest"] is trying to unpack in the same destination "/Users/akos.kitta/Library/Caches/Yarn/v6/npm-@theia-search-in-workspace-1.3.0-dc48e820ebee3de4a2eed0f9cbf3024125e9fe01-integrity/node_modules/@theia/search-in-workspace" as pattern ["@theia/search-in-workspace@^1.3.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["@theia/task@latest"] is trying to unpack in the same destination "/Users/akos.kitta/Library/Caches/Yarn/v6/npm-@theia-task-1.3.0-198dd0fcdab438fab1bbec5cf37d2f0fa60231e1-integrity/node_modules/@theia/task" as pattern ["@theia/task@^1.3.0","@theia/task@^1.3.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["@theia/terminal@latest"] is trying to unpack in the same destination "/Users/akos.kitta/Library/Caches/Yarn/v6/npm-@theia-terminal-1.3.0-e7c15e5546a4eb605c9926f43b30f1b5c6b9bedd-integrity/node_modules/@theia/terminal" as pattern ["@theia/terminal@^1.3.0","@theia/terminal@^1.3.0","@theia/terminal@^1.3.0","@theia/terminal@^1.3.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["@theia/userstorage@latest"] is trying to unpack in the same destination "/Users/akos.kitta/Library/Caches/Yarn/v6/npm-@theia-userstorage-1.3.0-d86c2a6f11e827d0ead25af113e8e3e5c406bb0b-integrity/node_modules/@theia/userstorage" as pattern ["@theia/userstorage@^1.3.0","@theia/userstorage@^1.3.0","@theia/userstorage@^1.3.0","@theia/userstorage@^1.3.0","@theia/userstorage@^1.3.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["@theia/workspace@latest"] is trying to unpack in the same destination "/Users/akos.kitta/Library/Caches/Yarn/v6/npm-@theia-workspace-1.3.0-9f058f198bcec5f4a3072d85e95e7b09b69e59c3-integrity/node_modules/@theia/workspace" as pattern ["@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0","@theia/workspace@^1.3.0"]. This could result in non-deterministic behavior, skipping.
warning monaco-languageclient@0.13.0: The engine "vscode" appears to be invalid.
warning vscode-languageclient@6.1.3: The engine "vscode" appears to be invalid.
error dugite-extra@0.1.12: The engine "node" is incompatible with this module. Expected version ">=10.11.0 <12". Got "12.14.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
akos.kitta@Akoss-MacBook-Pro theia-electron % 
vince-fugnitto commented 3 years ago

Unfortunately, I was still unable to reproduce the issue on macOS, could it be related to missing prerequisites?

Steps:

  1. clone the repository, master as of https://github.com/theia-ide/theia-apps/commit/1df3ba2ae48ed27d58d656a9c67ae5d3bed6deca
  2. perform git clean -ffdx (as an extra precaution)
  3. cd theia-electron
  4. perform yarn && yarn package

Additional Information:

# Details
Commit SHA https://github.com/theia-ide/theia-apps/commit/1df3ba2ae48ed27d58d656a9c67ae5d3bed6deca
Node v12.14.1
Yarn 1.22.4
DucNgn commented 3 years ago

I couldn't reproduce your issue either. Both yarn and yarn package work fine on my side.

Information:

marcdumais-work commented 3 years ago

Hi @kittaakos ,

I am not sure why, but I think that you're pulling a slightly older dugite-extra package, versus myself, and I have no problems.

"dugite-extra@0.1.14"

The version you pull, 0.1.12, apparently is not happy with node 12.x, while we made it mandatory to use that version of node for this and other example apps.

We could avoid such issues by maintaining a yarn.lock for the two Electron example apps, but I do not like the idea to have to update the apps monthly, for them to pick-up the latest @theia packages. Maybe we could programmatically alter yarn.lock before building to strip @theia entries, giving us I hope the best of both worlds?

WDYT?

marcdumais-work commented 3 years ago

Maybe this will help with troubheshooting:

theia-apps/theia-electron$ yarn why dugite-extra
yarn why v1.22.5
[1/4] Why do we have the module "dugite-extra"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "dugite-extra@0.1.14"
info Reasons this module exists
   - "@theia#git" depends on it
   - Hoisted from "@theia#git#dugite-extra"
info Disk size without dependencies: "1.3MB"
info Disk size with unique dependencies: "2.35MB"
info Disk size with transitive dependencies: "10.25MB"
info Number of shared dependencies: 41
kittaakos commented 3 years ago

My bad, I did not notice the yarn.lock is not checked in. A fresh clone also helped. Thank you for your time!