shannah / shellmarks

GUI for shell scripts
37 stars 8 forks source link

Runtime error. Shellmarks does not start #2

Closed karthick-kk closed 1 year ago

karthick-kk commented 1 year ago

Getting below error all nodejs version. With and without openjdk. ` ❯ shellmarks
Downloading java runtime environment for version 11 /nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/lib/node_modules/shellmarks/jdeploy-bundle/jdeploy.js:138 zipFile.readEntry() ^

TypeError: Cannot read properties of undefined (reading 'readEntry') at /nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/lib/node_modules/shellmarks/jdeploy-bundle/jdeploy.js:138:19 at /nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/lib/node_modules/shellmarks/node_modules/yauzl/index.js:37:7 at /nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/lib/node_modules/shellmarks/node_modules/yauzl/index.js:187:5 at /nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/lib/node_modules/shellmarks/node_modules/yauzl/index.js:631:5 at /nix/store/0l5yh0rdzibk8arj9c8gzy1570jkc3vf-nodejs-16.18.1/lib/node_modules/shellmarks/node_modules/fd-slicer/index.js:32:7 at FSReqCallback.wrapper [as oncomplete] (node:fs:671:5) ❯ node -v v16.18.1`

shannah commented 1 year ago

Can you provide more details about your environment? OS? How you installed it? Etc..

karthick-kk commented 1 year ago

I'm on Ubuntu Focal 20.04 LTS. I tried with nodejs 16, 18 and then on current 19. Getting the same error.

I suspect the jdk being not downloaded properly by deploy.js. Hints from https://api.adoptopenjdk.net/README says that the v2 api used for jdk install is currently deprecated, although not sure this has anything to do that.

I also replicated the issue on another distro, (using distrobox and install arch linux).

Pasting further the details.

` $ npm version { npm: '8.19.3', node: '19.2.0', v8: '10.8.168.20-node.8', uv: '1.44.2', zlib: '1.2.13', brotli: '1.0.9', ares: '1.18.1', modules: '111', nghttp2: '1.47.0', napi: '8', llhttp: '8.1.0', openssl: '3.0.7+quic', cldr: '42.0', icu: '72.1', tz: '2022f', unicode: '15.0', ngtcp2: '0.8.1', nghttp3: '0.7.0' } $ sudo npm install -g shellmarks

added 40 packages, and audited 41 packages in 14s

6 packages are looking for funding run npm fund for details

found 0 vulnerabilities $ shellmarks Downloading java runtime environment for version 11 /usr/lib/node_modules/shellmarks/jdeploy-bundle/jdeploy.js:138 zipFile.readEntry() ^

TypeError: Cannot read properties of undefined (reading 'readEntry') at /usr/lib/node_modules/shellmarks/jdeploy-bundle/jdeploy.js:138:19 at /usr/lib/node_modules/shellmarks/node_modules/yauzl/index.js:37:7 at /usr/lib/node_modules/shellmarks/node_modules/yauzl/index.js:187:5 at /usr/lib/node_modules/shellmarks/node_modules/yauzl/index.js:631:5 at /usr/lib/node_modules/shellmarks/node_modules/fd-slicer/index.js:32:7 at FSReqCallback.wrapper [as oncomplete] (node:fs:675:5)

Node.js v19.2.0 ekrkaxx@elx711831jn:~/dev/shellmarks$ cat /etc/os-release NAME="Ubuntu" VERSION="20.04.5 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.5 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal `

shannah commented 1 year ago

Thanks. Found the issue. Will have a fix out shortly.

shannah commented 1 year ago

I've fixed the issue and released a new version. You'll can install it with sudo npm install -g shellmarks

karthick-kk commented 1 year ago

Thanks. That solved the issue. Appreciate the quick fix :)