Open johnlindquist opened 1 year ago
I ran this command earlier tonight. Everything worked fine - Then I encountered an issue starting kit. Which caused me to uninstall and wanting to run the npx command again. Now I get the following error on the NPX as well:
undefined:7 } ^
SyntaxError: Unexpected token } in JSON at position 111
at JSON.parse (
I got an error in a weird background window when I start my laptop. Trying to run this install gives me the same error:
C:\Users\Me>npx @johnlindquist/install-kit@latest
Need to install the following packages:
@johnlindquist/install-kit@1.2.12
Ok to proceed? (y) y
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
undefined:1
SyntaxError: Unexpected token '', ""... is not valid JSON
at JSON.parse (<anonymous>)
at C.read (file:///C:/Users/Me/AppData/Local/npm-cache/_npx/3415c6bfffe36ec5/node_modules/@johnlindquist/kit-internal/dist/lowdb.js:1:4126)
at async s.read (file:///C:/Users/Me/AppData/Local/npm-cache/_npx/3415c6bfffe36ec5/node_modules/@johnlindquist/kit-internal/dist/lowdb.js:1:590)
at async db (file:///C:/Users/Me/AppData/Local/npm-cache/_npx/3415c6bfffe36ec5/node_modules/@johnlindquist/kit/core/db.js:43:5)
at async file:///C:/Users/Me/AppData/Local/npm-cache/_npx/3415c6bfffe36ec5/node_modules/@johnlindquist/kit/share/auth-scriptkit.js:8:16
Node.js v20.1.0
npm notice
npm notice New patch version of npm available! 9.6.4 -> 9.6.7
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.6.7
npm notice Run npm install -g npm@9.6.7 to update!
npm notice
My Install Failed. What Should I Do?
There are a wide variety of reasons why the app may fail to install across all the platforms/configurations/machines. That's why I extracted the install process into a nifty
npx
tool. Just run this command and you should be able to launch the app once it's complete.The app currently locks away the install process during startup (hence why I built the tool above). Once enough people verify the above tool works, I'll migrate it into the app.
More Details on the Install Process
The 3 Required Directories
1.
~/.kit
This is the Kit SDK. You should be able to download the SDK and extract it here. (This is also what
npm run build
tries to build)https://github.com/johnlindquist/kitapp/releases/latest
You should extract it so the package.json resides here:
~/.kit/package.json
2.
~/.kenv
This is the Kit Environent where scripts are stored. It's simply a way to organize scripts, logs, tmp, etc. You can clone it from: https://github.com/johnlindquist/kenv
You should clone it so the package.json resides here:
~/.kenv/package.json
3.
~/.knode
This is a version of node (v16.17.1) that matches the current version of the app.
https://nodejs.org/download/release/v16.17.1/
node
should be accessible as~/.knode/bin/node
Final Configuration Setups
Intall
esbuild
for TypeScript supportUse the .knode version of node to install esbuild into the ~/.kit dir:
Run the setup scripts
Thoughts on the Setup Process
esbuild
is a different binary per-platform. It's been a challenge to get the CI process bundling the correct version and fighting against code-signing of unsign binaries. I an not an expert in this area.~/.kit
and~/.knode
SDK outside of the app makes it possible to run scripts from the terminal and allows users to play with the SDK code before submitting PRs. It would be much easier to package it in the app, but we'd lose features.