kit icon indicating copy to clipboard operation
kit copied to clipboard

Script is not running from linked local kenv

Open Schmedu opened this issue 1 year ago • 2 comments

Hey @johnlindquist, I just tried to add import from a local kenv in a random folder and received this error:

Error: Could not find main module for @johnlindquist/kit
Error: Error: Could not find main module for @johnlindquist/kit

I guess it has something to do with the symlinking. Maybe it would better to move the directory just to ~/.kenv/kenvs, but I am unsure of the mechanics, restrictions, and / or your thoughts about it in general.

There is currently not a good option to add private kenv repos to Kit, the cloning works only for public repos 🤔

Schmedu avatar Jul 19 '23 21:07 Schmedu

That error is usually fixed in the terminal by running:

cd ~/.kenv ~/.knode/bin/npm i ~/.kit

From what I can tell, this usually happens when a user tries to "npm install" in the terminal using an npm other than "~/.knode/bin/npm".

I'm still not able to consistently reproduce, but I think it's because different versions of npm treat the "~/.kenv/.npmrc" config and symlinking differently. It's been a very frustrating issue to nail down 🙃

johnlindquist avatar Jul 22 '23 14:07 johnlindquist

Also, feel free to use your terminal to clone private repos in your ~/.kenv/kenvs

The Kit workflow uses a built-in JS "git" implementation that can't read your private/ssh credentials

johnlindquist avatar Jul 22 '23 14:07 johnlindquist