jellyfin / jellyfin-tizen

Jellyfin Samsung TV Client
https://jellyfin.org
936 stars 72 forks source link

Error when building WGT #215

Closed 10kmotorola closed 1 year ago

10kmotorola commented 1 year ago
orchid@mint-server:~/jellyfin-tizen$ node tizen.js build-web -e ".*" -e gulpfile.js -e README.md -e "node_modules/*" -e "package*.json" -e "yarn.lock"
Tizen adapter
/home/orchid/jellyfin-tizen/tizen.js:14
        var deviceId = localStorage.getItem('_deviceId2');
                       ^

ReferenceError: localStorage is not defined
    at getDeviceId (/home/orchid/jellyfin-tizen/tizen.js:14:24)
    at /home/orchid/jellyfin-tizen/tizen.js:25:19
    at Object.<anonymous> (/home/orchid/jellyfin-tizen/tizen.js:202:3)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Node.js v18.17.1

I've also tried using the standard tizen.sh used for Tizen CLI with no luck.

orchid@mint-server:~/jellyfin-tizen$ sudo ./tizen.sh build-web -e ".*" -e gulpfile.js -e README.md -e "node_modules/*" -e "package*.json" -e "yarn.lock"
[sudo] password for orchid:  
./tizen.sh: line 5: /home/orchid/jellyfin-tizen/../../../sdk.info: No such file or directory
find: ‘../lib-ncli’: No such file or directory
Error: Could not find or load main class org.tizen.ncli.ide.shell.Main
Caused by: java.lang.ClassNotFoundException: org.tizen.ncli.ide.shell.Main

I am running Tizen Studio 5.1 with 7.0 Mobile, Tizen SDK tools, TV Extensions-7.0, IOT-Headed-7.0 (and Headless, can never be too sure), Samsung Certificate Extension, and TV Extension Tools. I am connected to my TV and my Samsung Cert is working (I've installed TizenTube and know for a fact that it works).

Is there anything really obvious I'm missing, like not putting the cloned directory into the Tizen Studio one? Or using the wrong tizen file the run the command? I don't know, I'm tired, but thanks in advance.

dmitrylyzo commented 1 year ago

tizen in the build command is Tizen CLI tool (not JS, which is the source file). You can use the full path (tizen-studio/tools/ide/bin/tizen, iirc). I don't remember if it had been automatically added to the PATH environment variable on my PC.

10kmotorola commented 1 year ago

Yep, that works ! thanks :D