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

NODE_MODULE_VERSION error #3

Closed
christlee1989 opened this issue Sep 8, 2020 · 12 comments
Closed

NODE_MODULE_VERSION error #3

christlee1989 opened this issue Sep 8, 2020 · 12 comments

Comments

@christlee1989
Copy link

Bug Description:

when yarn start:
image

when yarn package:preview:
image

Steps to Reproduce:

1.clone this repo
2.exec yarn
3.exec yarn start

Additional Information

  • Operating System: macOS
  • Theia Version: 1.5.0
  • Node Version: v12.18.3
  • Python Version: v2.7
@vince-fugnitto
Copy link
Member

@christlee1989 the fix is present in the next release (1.6.0) at the end of the month: eclipse-theia/theia#8454.
For the moment, you can call your own script to rebuild the native electron dependencies to include drivelist instead of the following:

https://github.com/eclipse-theia/theia-example/blob/8ddf8cd2a84acd1e0f5de2a7a65e342f91631a11/package.json#L79

@christlee1989
Copy link
Author

@christlee1989 the fix is present in the next release (1.6.0) at the end of the month: eclipse-theia/theia#8454.
For the moment, you can call your own script to rebuild the native electron dependencies to include drivelist instead of the following:

https://github.com/eclipse-theia/theia-example/blob/8ddf8cd2a84acd1e0f5de2a7a65e342f91631a11/package.json#L79

@vince-fugnitto but I try to use theia version: next , and after electron-rebuild the drivelist recompile success, still error

@vince-fugnitto
Copy link
Member

@vince-fugnitto but I try to use theia version: next , and after electron-rebuild the drivelist recompile success, still error

I tried myself and it worked correctly (the application successfully started):

  1. clone the repository
  2. update all the theia dependencies to next instead of ^1.5.0 in the package.json
  3. perform yarn
  4. perform yarn start

image

@christlee1989
Copy link
Author

@vince-fugnitto why i still error :(

image

@christlee1989
Copy link
Author

@vince-fugnitto my versions

image

@vince-fugnitto
Copy link
Member

@christlee1989 you can perform a git clean -ffdx before you build, it's likely your yarn.lock is pinning the version of the theia extensions to a prior version? You can double check by verifying the version of @theia extension under node_modules.

For example, my @theia/core package.json version:

  "name": "@theia/core",
  "version": "1.6.0-next.d45b301c",

@christlee1989
Copy link
Author

@vince-fugnitto I removed yarn.lock before yarn

image

@vince-fugnitto
Copy link
Member

@vince-fugnitto I removed yarn.lock before yarn

What is your most recent error? This is my package.json for reference:

{
  "private": true,
  "name": "theia-example",
  "productName": "Theia Electron Example Application",
  "version": "1.5.0",
  "main": "src-gen/frontend/electron-main.js",
  "license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0",
  "author": "Rob Moran <github@thegecko.org>",
  "homepage": "https://github.com/eclipse-theia/theia-example#readme",
  "bugs": {
    "url": "https://github.com/eclipse-theia/theia/issues"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/eclipse-theia/theia-example.git"
  },
  "engines": {
    "node": ">=10.2.0"
  },
  "theia": {
    "target": "electron",
    "frontend": {
      "config": {
        "applicationName": "Theia Electron Example Application"
      }
    },
    "backend": {
      "config": {
        "startupTimeout": -1
      }
    }
  },
  "dependencies": {
    "@theia/callhierarchy": "next",
    "@theia/console": "next",
    "@theia/core": "next",
    "@theia/debug": "next",
    "@theia/editor": "next",
    "@theia/editor-preview": "next",
    "@theia/electron": "next",
    "@theia/file-search": "next",
    "@theia/filesystem": "next",
    "@theia/getting-started": "next",
    "@theia/git": "next",
    "@theia/keymaps": "next",
    "@theia/markers": "next",
    "@theia/messages": "next",
    "@theia/metrics": "next",
    "@theia/mini-browser": "next",
    "@theia/monaco": "next",
    "@theia/navigator": "next",
    "@theia/outline-view": "next",
    "@theia/output": "next",
    "@theia/plugin-dev": "next",
    "@theia/plugin-ext": "next",
    "@theia/plugin-ext-vscode": "next",
    "@theia/preferences": "next",
    "@theia/preview": "next",
    "@theia/process": "next",
    "@theia/scm": "next",
    "@theia/scm-extra": "next",
    "@theia/search-in-workspace": "next",
    "@theia/task": "next",
    "@theia/terminal": "next",
    "@theia/typehierarchy": "next",
    "@theia/userstorage": "next",
    "@theia/variable-resolver": "next",
    "@theia/vsx-registry": "next",
    "@theia/workspace": "next"
  },
  "devDependencies": {
    "@theia/cli": "next",
    "electron-builder": "^22.8.0"
  },
  "scripts": {
    "prepare": "yarn build",
    "lint": "theiaext lint",
    "clean": "theia clean",
    "build": "theia rebuild:electron && yarn bundle",
    "bundle": "theia build",
    "watch": "concurrently -n compile,bundle \"theiaext watch --preserveWatchOutput\" \"theia build --watch --mode development\"",
    "start": "theia start --plugins=local-dir:../../plugins",
    "start:debug": "yarn start --log-level=debug",
    "test": "electron-mocha --timeout 60000 \"./lib/test/**/*.espec.js\"",
    "package": "electron-builder -c.mac.identity=null --publish never",
    "package:preview": "electron-builder --dir"
  }
}

@christlee1989
Copy link
Author

@vince-fugnitto exactly the same

@christlee1989
Copy link
Author

@vince-fugnitto I try the https://github.com/theia-ide/theia-trace-extension , this no error, can you find some difference?

@vince-fugnitto
Copy link
Member

vince-fugnitto commented Sep 9, 2020

@vince-fugnitto I try the https://github.com/theia-ide/theia-trace-extension , this no error, can you find some difference?

The theia-trace-extension includes a yarn.lock file which pins the @theia dependencies to 1.4.0.
What exactly is your use-case, are you looking for an example on how to build your own application?

Update: you can try the following repository if you like (I made the changes I expressed earlier and hopefully it's clearer): https://github.com/vince-fugnitto/theia-next. The changes work well for me, I am able to build and start using:

yarn 
yarn start

@vince-fugnitto
Copy link
Member

Closing due to inactivity, and the issue was not reproduced.
Also mentioned a way forward #3 (comment) if any issues are still present.

sdirix pushed a commit to sdirix/theia-blueprint that referenced this issue Nov 12, 2024
…se-version-0.1.0

Update scorpio with release version 0.1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants