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

Slack CLI fails to detect NodeJS #26

Open
FallingReign opened this issue Apr 26, 2024 · 1 comment
Open

Slack CLI fails to detect NodeJS #26

FallingReign opened this issue Apr 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@FallingReign
Copy link

When executing the command slack create -t slack-samples/bolt-python-custom-function-template my-app the script exists with Error code 1.
Following this, slack run will fail due to missing dependencies.

manually running npm install will then allow slack run to function as expected.

DEBUG 2024/04/26 13:15:44.608327 unsupported runtime found: Failed to detect project runtime from directory structure (runtime_not_supported)
INFO 2024/04/26 13:15:44.609069 ------------------------------------
INFO 2024/04/26 13:15:44.609069 Operating System (OS): [windows]
INFO 2024/04/26 13:15:44.609069 Command: [...\AppData\Local\slack-cli\bin\slack.exe create -t slack-samples/bolt-js-custom-function-template my-app]
INFO 2024/04/26 13:15:44.609069 SessionID: [4d4d0501-3ce1-43a0-b427-fd646701dc4c]
INFO 2024/04/26 13:15:44.609069 Slack-CLI-TraceID: [03db4d6df3e9653c]
INFO 2024/04/26 13:15:44.609069 Slack-CLI Version: [2.22.0]
INFO 2024/04/26 13:15:44.609069 System ID: [7ae7b819-7d42-4f5e-abe8-8334952a6806]
DEBUG 2024/04/26 13:15:45.298330 "check-update" hook value not found in slack.json when checking for SDK updates
DEBUG 2024/04/26 13:15:45.912177 initialize runtime from auto-detect: Node.js (nodejs)
DEBUG 2024/04/26 13:15:51.613169 Starting root command cleanup routine
ERROR 2024/04/26 13:15:51.615717 exit status 1�[1;38;5;178m�[0m

DEBUG 2024/04/26 13:15:51.617824 FlushToLogstash will POST https://slackb.com/events/cli payload: [{"context":{"bin":"...\\AppData\\Local\\slack-cli\\bin\\slack.exe","cli_version":"2.22.0","command":"create","command_canonical":"create","flags":["template"],"host":"5f0284b18d67b7109adf65bb5de494643a3a0bb7","os":"windows","project_id":"d6509782-0a94-4375-ac3b-2c0d9dcd5a0f","session_id":"4d4d0501-3ce1-43a0-b427-fd646701dc4c","system_id":"7ae7b819-7d42-4f5e-abe8-8334952a6806"},"data":{"app":{"template":"slack-samples/bolt-js-custom-function-template"},"auth":{},"error_code":"app_create_error","error_msg":"exit status 1\n"},"event":"error","timestamp":1714101351616}]
DEBUG 2024/04/26 13:15:51.848699 FlushToLogstash response status code: 200, body: ok
@zimeg zimeg added the bug Something isn't working label May 1, 2024
@zimeg
Copy link
Member

zimeg commented May 1, 2024

Hey @FallingReign 👋 Thanks for digging into debug logs for this and it's great to know you found the manual install workaround! We're exploring solutions to this at the moment, but it's still unclear why this happens to be honest...

Just for my own understanding, is this happening with just slack-samples/bolt-js-custom-function-template or also with slack-samples/bolt-python-custom-function-template?

Some rambling thoughts on these logs

Thank you again for including these logs! Just writing thoughts here, so feel free to ignore.

The first "unsupported runtime found" is expected as part of initializing the CLI outside of a project directory. Towards the end of the logs, "initialize runtime from auto-detect: Node.js" appears which seems to be right for this project you're cloning. I'm not sure why a failed check for the "check-update" hook is happening and will check on this soon.

The command being attempted for installs is:

$ npm install --no-package-lock --no-audit --prefer-offline --progress=false --loglevel=verbose .

I'd be interested in knowing if this command doesn't work while npm install does? Maybe one of these flags is changing something?

I'm also interested if this could be caused by caching strangeness?

Alright that's enough rambling

Let's leave the issue open to track updates or more discoveries around this! Thank you again sharing 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants