kit
kit copied to clipboard
Opening Script Kit Prompt Flashes
I installed ScriptKit on an Apple Silicon Mac. Once I installed I pressed cmd-; and it flashes a window for less than second and then goes away. Seems it can't find esbuild
[2023-12-21 11:00:01.419] [warn] Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'esbuild' imported from /Users/scott/.kit/build/loader.js [2023-12-21 11:00:01.419] [warn] ☠️ ERROR PROMPT SHOULD SHOW ☠️ [2023-12-21 11:00:01.421] [warn] Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'esbuild' imported from /Users/scott/.kit/build/loader.js at new NodeError (node:internal/errors:405:5) at packageResolve (node:internal/modules/esm/resolve:890:9) at moduleResolve (node:internal/modules/esm/resolve:939:20) at defaultResolve (node:internal/modules/esm/resolve:1132:11) at nextResolve (node:internal/modules/esm/loader:163:28) at ESMLoader.resolve (node:internal/modules/esm/loader:835:30) at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18) at ESMLoader.import (node:internal/modules/esm/loader:524:22) at importModuleDynamically (node:internal/modules/esm/translators:110:35) at importModuleDynamicallyCallback (node:internal/process/esm_loader:36:14) [2023-12-21 11:00:01.423] [info] 3223 setScript { script: '/Users/scott/.kit/cli/error-action.js' } [2023-12-21 11:00:01.424] [warn] Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'esbuild' imported from /Users/scott/.kit/build/loader.js
I'm having the exact same problem. Fresh install on latest macOS (14.2.1) on an M1 Max machine, haven't been able to use the app yet due to this issue: the window opens for a fraction of a second and then disappears.
@scottfwalter @iliyang
- Check the setup/
main.log
:
Please share this file, it contains what happened during install:
~/Library/Logs/Kit/main.log
- Check if
~/.kit
looks correct:
During the setup process, the app downloads the SDK from then extracts the SDK to ~/.kit
. It's possible this step failed:
https://github.com/johnlindquist/kitapp/releases/tag/v2.2.8
(Make sure to check the os and architecture)
- Check if
esbuild
exists:
After the SDK is installed, the app attempts to install esbuild, it's possible this step failed, you could fix it like this:
- Quit Kit.app
then in the terminal:
cd ~/.kit
~/.knode/bin/npm i esbuild
- Open Kit.app
- Report back Let me know if this fixes it
Preventing this in the future
That whole SDK/esbuild install process was required because I hadn't yet figured out all the various nuances of targeting different OS/arch during the GitHub actions build process. This caused all sorts of cross platform issues (and trust me, trying to debug a Windows arm64 issue when you don't have a Windows arm64 machine is not fun 😅).
I think I've got the build sorted enough that I can finally bundle the SDK/esbuild with the app and completely avoid that annoying initial install.
Thanks for the reply! I ran step 2 and it works now!