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

False Error node version should be ok; it is not OLD #773

Open
donPab opened this issue Feb 24, 2023 · 4 comments
Open

False Error node version should be ok; it is not OLD #773

donPab opened this issue Feb 24, 2023 · 4 comments

Comments

@donPab
Copy link

donPab commented Feb 24, 2023

Bug Report

Bug Summary
==False Error node version should be ok; it is not OLD

Steps To Reproduce
1.1 Start VSCode
1.2 Click on File, then Open File
1.3 Scroll to C:\H_Paul\Pencil\pencil-development\app.vscode
1.4 Select launch.json
1.5 On Activity bar, click on Extentions
1.6 Click on Dbux (ALPHA)
1.7 Click on Enable
1.8 On Activity bar, click on Dbux
1.9 On Primary Sidebar, click on Start Dbux
1.10 In Primary Sidebar on Applications row, click on Start Dbux Runtime Server
1.11 In Primary Sidebar on Applications row, click on Debug Current File
1.12 See error

Expected behavior
Dbux debug trace of application processing.
Since version of node is clearly more recent than required.

Actual behavior
VSCode error box, as shown in Dbux Output Log, having--
node
Installed but old. Version is 18.14.0 but we recommend 16.
no debugging or tracing was performed.

Attachments

Relevant Code

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "LaunchDebugMainProcess",
      "type": "node",
      "request": "launch",

      "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
      "runtimeArgs":["--no-sandbox"  ],

      "cwd": "${workspaceRoot}",
      "program": "${workspaceRoot}/index.js",
      "args": [],
      "stopOnEntry": false,
      "sourceMaps": false,
      "outputCapture": "std",

      "preLaunchTask": ""
    }
  ]
}

Dbux Output Log
[Dbux installUtil] Checking library dependencies. Found 0 missing:
[Dbux exec] > Microsoft VS Code$ "node" --version
[Dbux exec] ("node" EXIT: code=0, signal=null)
[Dbux Notifications] [Dbux] Dbux requires the following programs to be installed and available on your system in order to run smoothly. Please make sure, you have all of them installed.

✓ shell
found at "C:/WINDOWS/SYSTEM32/CMD.EXE"
✓⚠ node
Installed but old. Version is 18.14.0 but we recommend 16.
✓ npm
found at "C:/PROGRAM FILES/NODEJS/NPM.CMD"

FAILED: One or more system dependencies are not installed. Fix them, then try again.
[Dbux Notifications] > User responded with "undefined"
[Dbux Command] 'dbux.debugFile' failed: Error: [Dbux] System dependency check failed :(
at checkSystem (c:\Users\paulg.vscode\extensions\domi.dbux-code-0.7.9\dist\bundle.js:2:296847)
at async runFile (c:\Users\paulg.vscode\extensions\domi.dbux-code-0.7.9\dist\bundle.js:2:648998)
at async c:\Users\paulg.vscode\extensions\domi.dbux-code-0.7.9\dist\bundle.js:2:281035
at async s.h (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:96:108008)

Dbux Runtime (Console) Log

Screenshots

System (please complete the following information):

  • OS: WIN10 Pro v.21H2 build 19044.2604 on Lenovo X1 PC
  • VSCode: v.1.75.1
  • Dbux VSCode Extension version: (ALPHA) v.0.7.9
  • Affected Dbux Packages (+ version numbers): none

Additional context

@Domiii
Copy link
Owner

Domiii commented Feb 24, 2023

Related to #593.
Version 16 is currently hardcoded in this line of code.

  • I'd recommend, either change that line or downgrade to 16 using volta or nvm.
  • The better fix would be to change requirements to check for "greater or equal" instead of "equal".

Also: Can't you just say "keep going" even with the warning? That theoretically should be possible, but maybe there is a small bug.

@donPab
Copy link
Author

donPab commented Feb 24, 2023

It would seem to my untrained eyes that the default--
export const DefaultNodeVersion = '16';

might be changed to something like--
export const DefaultNodeVersion = '>=16.0.0';

and let semver.satisfies do a proper compare??

@Domiii
Copy link
Owner

Domiii commented Feb 24, 2023

It would seem to my untrained eyes that the default-- export const DefaultNodeVersion = '16';

might be changed to something like-- export const DefaultNodeVersion = '>=16.0.0';

and let semver.satisfies do a proper compare??

If that works, sure! Please test and file a PR if it works🙏 😄

@donPab
Copy link
Author

donPab commented Feb 26, 2023

I just patched bundle.js and then ran it.
== results

✓  shell
    found at "C:/WINDOWS/SYSTEM32/CMD.EXE"
✓  node
    found at "C:/PROGRAM FILES/NODEJS/NODE.EXE" (v18.14.0 satisfies >=16)
✓  npm
    found at "C:/PROGRAM FILES/NODEJS/NPM.CMD"

SUCCESS! All system dependencies seem to be in order.

I don't know anything about PR.
Creating extensions and regression testing on VSCode is beyond my experience and pay grade.
I leave it to you to incorporate this change.
tkx, donPab

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