eclipse-velocitas / cli

Velocitas CLI
Apache License 2.0
4 stars 2 forks source link

velocitas cli 0.5.0 Error: Cannot find module '../build/Debug/pty.node' / GLIBC_2.34 not found #109

Open mikehaller opened 1 year ago

mikehaller commented 1 year ago

The CLI throws errors on certain base OS version, as it does not seem to support "older" OS versions (which are still in support, but may not be considered cutting edge...)

Updating to a newer version is of course possible, however many existing containers, such as the (current) "python:3.11" base containers are still based on Debian 11.

Fails on:

Works on:

/workspaces/leda-example-applications (main) $ cat /etc/issue
Ubuntu 20.04.6 LTS \n \l

/workspaces/leda-example-applications (main) $ curl -L https://github.com/eclipse-velocitas/cli/releases/download/v0.5.0/velocitas-linux-x64 -o ./velocitas
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 59.1M  100 59.1M    0     0  51.5M      0  0:00:01  0:00:01 --:--:-- 73.5M
@mikehaller ➜ /workspaces/leda-example-applications (main) $ ./velocitas --help
innerError Error: Cannot find module '../build/Debug/pty.node'
Require stack:
- /snapshot/cli/node_modules/node-pty/lib/unixTerminal.js
- /snapshot/cli/node_modules/node-pty/lib/index.js
- /snapshot/cli/dist/modules/exec.js
- /snapshot/cli/dist/commands/exec/index.js
- /snapshot/cli/node_modules/@oclif/core/lib/module-loader.js
- /snapshot/cli/node_modules/@oclif/core/lib/config/plugin.js
- /snapshot/cli/node_modules/@oclif/core/lib/config/config.js
- /snapshot/cli/node_modules/@oclif/core/lib/config/index.js
- /snapshot/cli/node_modules/@oclif/core/lib/command.js
- /snapshot/cli/node_modules/@oclif/core/lib/index.js
- /snapshot/cli/bin/run
1) If you want to compile the package/file into executable, please pay attention to compilation warnings and specify a literal in 'require' call. 2) If you don't want to compile the package/file into executable and want to 'require' it from filesystem (likely plugin), specify an absolute path in 'require' call using process.cwd() or process.execPath.
    at Module._resolveFilename (node:internal/modules/cjs/loader:946:15)
    at Function._resolveFilename (pkg/prelude/bootstrap.js:1951:46)
    at Module._load (node:internal/modules/cjs/loader:787:27)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at Module.require (pkg/prelude/bootstrap.js:1851:31)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/snapshot/cli/node_modules/node-pty/lib/unixTerminal.js:30:15)
    at Module._compile (pkg/prelude/bootstrap.js:1926:22)
    at Module._extensions..js (node:internal/modules/cjs/loader:1166:10)
    at Module.load (node:internal/modules/cjs/loader:988:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/snapshot/cli/node_modules/node-pty/lib/unixTerminal.js',
    '/snapshot/cli/node_modules/node-pty/lib/index.js',
    '/snapshot/cli/dist/modules/exec.js',
    '/snapshot/cli/dist/commands/exec/index.js',
    '/snapshot/cli/node_modules/@oclif/core/lib/module-loader.js',
    '/snapshot/cli/node_modules/@oclif/core/lib/config/plugin.js',
    '/snapshot/cli/node_modules/@oclif/core/lib/config/config.js',
    '/snapshot/cli/node_modules/@oclif/core/lib/config/index.js',
    '/snapshot/cli/node_modules/@oclif/core/lib/command.js',
    '/snapshot/cli/node_modules/@oclif/core/lib/index.js',
    '/snapshot/cli/bin/run'
  ],
  pkg: true
}
innerError Error: Cannot find module '../build/Debug/pty.node'
Require stack:
- /snapshot/cli/node_modules/node-pty/lib/unixTerminal.js
- /snapshot/cli/node_modules/node-pty/lib/index.js
- /snapshot/cli/dist/modules/exec.js
- /snapshot/cli/dist/commands/init/index.js
- /snapshot/cli/node_modules/@oclif/core/lib/module-loader.js
- /snapshot/cli/node_modules/@oclif/core/lib/config/plugin.js
- /snapshot/cli/node_modules/@oclif/core/lib/config/config.js
- /snapshot/cli/node_modules/@oclif/core/lib/config/index.js
- /snapshot/cli/node_modules/@oclif/core/lib/command.js
- /snapshot/cli/node_modules/@oclif/core/lib/index.js
- /snapshot/cli/bin/run
1) If you want to compile the package/file into executable, please pay attention to compilation warnings and specify a literal in 'require' call. 2) If you don't want to compile the package/file into executable and want to 'require' it from filesystem (likely plugin), specify an absolute path in 'require' call using process.cwd() or process.execPath.
    at Module._resolveFilename (node:internal/modules/cjs/loader:946:15)
    at Function._resolveFilename (pkg/prelude/bootstrap.js:1951:46)
    at Module._load (node:internal/modules/cjs/loader:787:27)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at Module.require (pkg/prelude/bootstrap.js:1851:31)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/snapshot/cli/node_modules/node-pty/lib/unixTerminal.js:30:15)
    at Module._compile (pkg/prelude/bootstrap.js:1926:22)
    at Module._extensions..js (node:internal/modules/cjs/loader:1166:10)
    at Module.load (node:internal/modules/cjs/loader:988:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/snapshot/cli/node_modules/node-pty/lib/unixTerminal.js',
    '/snapshot/cli/node_modules/node-pty/lib/index.js',
    '/snapshot/cli/dist/modules/exec.js',
    '/snapshot/cli/dist/commands/init/index.js',
    '/snapshot/cli/node_modules/@oclif/core/lib/module-loader.js',
    '/snapshot/cli/node_modules/@oclif/core/lib/config/plugin.js',
    '/snapshot/cli/node_modules/@oclif/core/lib/config/config.js',
    '/snapshot/cli/node_modules/@oclif/core/lib/config/index.js',
    '/snapshot/cli/node_modules/@oclif/core/lib/command.js',
    '/snapshot/cli/node_modules/@oclif/core/lib/index.js',
    '/snapshot/cli/bin/run'
  ],
  pkg: true
}
(node:8096) [ERR_DLOPEN_FAILED] Error Plugin: velocitas-cli: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /tmp/pkg/33635ea2a13279822d0c9ed28131b67751ca2a5d49cfd3b969c0a9987328e088/node-pty/build/Release/pty.node)
module: @oclif/core@1.26.2
task: toCached
plugin: velocitas-cli
root: /snapshot/cli
See more details with DEBUG=*
(Use `velocitas --trace-warnings ...` to show where the warning was created)
(node:8096) [ERR_DLOPEN_FAILED] Error Plugin: velocitas-cli: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /tmp/pkg/33635ea2a13279822d0c9ed28131b67751ca2a5d49cfd3b969c0a9987328e088/node-pty/build/Release/pty.node)
module: @oclif/core@1.26.2
task: toCached
plugin: velocitas-cli
root: /snapshot/cli
See more details with DEBUG=*
Lifecycle management of Velocitas Vehicle Applications

VERSION
  velocitas-cli/0.5.0 linux-x64 node-v18.5.0

USAGE
  $ velocitas [COMMAND]

TOPICS
  cache  Interact with the project cache

COMMANDS
  help     Display help for velocitas.
  package  Prints information about packages
  sync     Syncs Velocitas components into your repo.
  upgrade  Updates Velocitas components.

Other notes:

MP91 commented 1 year ago

Hey @mikehaller, for now we only used the CLI in our devcontainers and never had problems, but of course that is a really limited set of OS.

We will try to solve this issue of course!

dennismeister93 commented 1 year ago

Hi @mikehaller first of all thank you for your investigation but unfortunately we internally came to a conclusion that we rate this issue as a pretty low priority at the moment and in this case want to clearly point out that your mentioned operating systems are not part of our target platforms. We may integrate the support of a higher range of OS, but not for now.

But other than that, your other mentioned issue https://github.com/eclipse-velocitas/cli/issues/110 for returning proper exit codes will be implemented soon!

Thank you! :)