Skip to content

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

@zimeg

Description

@zimeg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugM-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions