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

How does "brightscript" task pick node version? #546

Open
elliot-nelson opened this issue Feb 28, 2024 · 1 comment
Open

How does "brightscript" task pick node version? #546

elliot-nelson opened this issue Feb 28, 2024 · 1 comment

Comments

@elliot-nelson
Copy link

elliot-nelson commented Feb 28, 2024

Recently, we've had some folks using debug tasks configured as BrightScript tasks, for example:

    {
      "type": "brightscript",
      "request": "launch",
      "name": "SDK ReferenceApp",
      "stopOnEntry": false,
      "host": "${env:ROKU_IP}",
      "password": "${env:ROKU_PASSWORD}",
      "rootDir": "${workspaceFolder}/sandbox/app/build/prod",
      "outDir": "${workspaceFolder}/sandbox/app/out",
      "files": ["*", "**"],
      "enableDebuggerAutoRecovery": false,
      "stopDebuggerOnAppExit": false,
      "preLaunchTask": "Build ReferenceApp",
      "injectRaleTrackerTask": false
    }

But, it keeps starting this task with node "16.0.0", even though the .nvmrc file in the repo says 16.15.0, and the user sets nvm alias default 16.15.0.

Is there a way to configure a "brightscript" task to use the "default" node version, similar to the way that tasks of type "node" can configure their runtimeVersion as "default"?

@TwitchBronBron
Copy link
Member

TwitchBronBron commented Feb 28, 2024

Vscode ships with a specific node version (which can be seen in the "about vscode" window. Mine is currently running node 18.17.1). The language server and debug server and the extension itself all run with that bundled node version, and we have no control over that.

The preLaunchTask , if configured to be run as "shell", should run whatever node version your shell discovers. Running that task directly from vscode (i.e. "command pallet" -> run task -> "Build ReferenceApp") should be run in the exact same context as if the launch command has triggered it, so hopefully that provides some insight into what's going on.

In both cases, we don't actually pick the node version at all.

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