Closed Ottaviocr closed 8 months ago
I forgot to add, I had an error during "run compile":
Running /home/oc/opt/bin/npm run compile, pid: 28370
> @keybr/keyboard@0.0.0 compile
> tsc
lib/data/layout/fr_erglace.ts(8,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
Source has 5 element(s) but target allows only 4.
lib/data/layout/fr_erglace.ts(9,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(10,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(11,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(12,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(13,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(14,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(15,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(16,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(17,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(22,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(24,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(25,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(27,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(28,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(34,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(35,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(37,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(39,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(40,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(41,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(42,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(50,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(51,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
lib/data/layout/fr_erglace.ts(52,3): error TS2322: Type '[number, number, number, number, number]' is not assignable to type 'readonly [a?: number | undefined, b?: number | undefined, c?: number | undefined, d?: number | undefined]'.
npm ERR! Lifecycle script `compile` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: @keybr/keyboard@0.0.0
npm ERR! at location: /home/oc/git/keybr.com/packages/keybr-keyboard
Error: NPM Script Runner: /home/oc/opt/bin/npm run compile exited with code 1
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
Took a total of 1m 16.66s to complete.
The last compilation error has been fixed in the latest commits just a couple hours ago.
The manifest.json
file is produced by webpack when running the npm run build
script. Can you please check that file /home/oc/keybr.com/root/public/assets/manifest.json
exists?
To solve the Internal Server Error you need to fix the PUBLIC_DIR
configuration variable in your .env
file. In your case it should be something like PUBLIC_DIR=~/keybr.com/root/public
. However, looking at the error message, it looks like you configured it correctly.
Please check the existence of the manifest file.
Ah, from the first log line I can see that you checked out the repository to ~/git/keybr.com
.
oc@t440:~/git/keybr.com$ npm start
However, later in the log I see that your public dir is configured as ~/keybr.com
:
...
publicDir: '/home/oc/keybr.com/root/public',
...
That is a different directory!
Please update the PUBLIC_DIR
variable your .env
file:
PUBLIC_DIR=~/git/keybr.com/root/public
Mind the /git/
prefix.
Thanks aradzie, that fixes it.
(Incidentally, is there a way to import the settings from my online instance at keybr.com?)
If you want to import your data from keybr.com, you can download the file loaded from the https://www.keybr.com/_/sync/data
endpoint.
Than place this file somewhere to DATA_DIR
according to your local numeric user id. The final file name should look like "/home/oc/.local/state/keybr/user_stats/000/000/000000001"
where "/home/oc/.local/state/keybr"
is configured in your DATA_DIR
. If you have a different user id, then update the digits accordingly.
Am Di., 5. März 2024 um 10:11 Uhr schrieb Aliaksandr Radzivanovich @.***>:
If you want to import your data, you can download the file loaded from the https://www.keybr.com/_/sync/data endpoint.
Than place this file somewhere to DATA_DIR according to your local numeric user id. The final file name should look like "/home/oc/.local/state/keybr/user_stats/000/000/000000001" where "/home/oc/.local/state/keybr" is configured in your DATA_DIR. If you have a different user id, then update the digits accordingly.
Is this documented anywhere? I am struggling to make it work. My uid and gid are 1000. I created /home/oc/.local/state/keybr/user_stats/1000/1000/ and renamed the file stats.data as /home/oc/.local/state/keybr/user_stats/1000/1000/000000001 but it didn't seem to work.
-- Ottavio Caruso
I also created .local/state/keybr/user_stats/000/000/000000001 but that doesn't work either. Let me know if I need to create a new ticket.
I don't think it's worth documenting.
Please note we are speaking about the keybr internal ids, not the unix user ids. (1000 looks like a unix id.)
Examine the contents of the user_stats
directory. If it's empty, sign in with an online account and complete a few lessons. Then a file should appear under the stats directory. It should be named as described a above, using digits from your user id. Replace that file with the one you downloaded from keybr.com. Refresh the web page to see the changes.
The directory naming scheme is as follows. If you have a user id 123456789, then the user_stats/123/456/123456789
file will be created.
It is a bad idea to keep all user files in a single giant directory, so we use use a radix tree like structure of directories.
My system is Debian Bullseye, I have cloned the git repo and followed the instructions religiously from getting_started.md.
Then, upon running npm start, I get:
If I manually point my browser to http://localhost:3000/, I get "500 - Internal Server Error"
Where would I get this "manifest.json" from?