slackapi / slackapi/slack-cli

The "runtime_not_found" error appears on Windows despite having the hook runtime installed

Open
#251 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
305
Forks
46
Avg merge
1d 11h
Merged PRs (30d)
23

Description

Description

Attempting to run a new app on Windows errors with a runtime_not_found error if scripts are not allowed, despite having node installed.

Version
Using slack.exe v3.9.0
OS Info

The current template errors for the "ver" command on PowerShell:

ver: The term 'ver' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

But this appears in Command Prompt:

Microsoft Windows [Version 10.0.22000.2538]

For this issue I am using PowerShell version:

> pwsh --version
PowerShell 7.5.3

Here is the current node version installed too:

> node --version
v24.11.0
Steps to reproduce:

Share the commands to run, source code, and project settings:

  1. Install node using the ".msi" installer for Windows: https://nodejs.org/en/download
  2. Create the Bolt for JavaScript starter template: http://github.com/slack-samples/bolt-js-starter-template
  3. Attempt to install and run the app on in a development workspace.
Expected result

The hooks are loaded.

Actual result
> slack run --team T02A074M3U3

> If you leave this team, you can no longer manage the installed apps
   Installed apps will belong to the team if you leave the workspace

Check C:\Users\user\.slack\logs\slack-debug-20251031.log for error logs
The hook runtime executable was not found (runtime_not_found)
   The `start` script was not found (sdk_hook_not_found)

> Suggestion
   Make sure the required runtime has been installed to run hook scripts.

From the verbose logs:

starting hook command: npx -q --no-install -p @slack/cli-hooks slack-cli-get-hooks
 npx : File C:\Program Files\nodejs\npx.ps1 cannot be loaded because running scripts is disabled on this system. For
 more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
 At line:1 char:1
 + npx -q --no-install -p @slack/cli-hooks slack-cli-get-hooks
 + ~~~
 + CategoryInfo          : SecurityError: (:) [], PSSecurityException
 + FullyQualifiedErrorId : UnauthorizedAccess
 finished hook command: npx -q --no-install -p @slack/cli-hooks slack-cli-get-hooks
 failed to initialize hook configurations: Error running 'GetHooks' command: exit status 1 (sdk_hook_invocation_failed)
    npx : File C:\Program Files\nodejs\npx.ps1 cannot be loaded because running scripts is disabled on this system. For
    more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
    At line:1 char:1
    + npx -q --no-install -p @slack/cli-hooks slack-cli-get-hooks
    + ~~~
        + CategoryInfo          : SecurityError: (:) [], PSSecurityException
        + FullyQualifiedErrorId : UnauthorizedAccess

 > Suggestion
    Run `slack.exe doctor` to check that your system dependencies are up-to-date.
Requirements
  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing slack run --team T02A074M3U3 in PowerShell and compare its hook command with Command Prompt. Trace the logged npx -q --no-install -p @slack/cli-hooks slack-cli-get-hooks invocation and use slack.exe doctor for dependency context. Done means the Windows starter app loads its hooks instead of reporting runtime_not_found when PowerShell script execution is restricted.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, node.js, powershell
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.