Hi zusammen,
funktioniert der gassistant bei jemandem?
was mach ich hier falsch? Modul ist so out of the box frisch geladen :)
TypeError: code.startsWith is not a function
at removeShebang (/usr/lib/node_modules/gassistant-fhem/node_modules/vm2/lib/main.js:157:12)
at NodeVM.jsCompiler (/usr/lib/node_modules/gassistant-fhem/node_modules/vm2/lib/main.js:120:9)
at NodeVM.run (/usr/lib/node_modules/gassistant-fhem/node_modules/vm2/lib/main.js:1154:11)
at getModule (/usr/lib/node_modules/gassistant-fhem/lib/cli.js:13:13)
at Object.<anonymous> (/usr/lib/node_modules/gassistant-fhem/lib/cli.js:16:18)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
Loading cli.js...
/usr/lib/node_modules/gassistant-fhem/node_modules/vm2/lib/main.js:157
if (!code.startsWith('#!')) return code;
^
TypeError: code.startsWith is not a function
at removeShebang (/usr/lib/node_modules/gassistant-fhem/node_modules/vm2/lib/main.js:157:12)
at NodeVM.jsCompiler (/usr/lib/node_modules/gassistant-fhem/node_modules/vm2/lib/main.js:120:9)
at NodeVM.run (/usr/lib/node_modules/gassistant-fhem/node_modules/vm2/lib/main.js:1154:11)
at getModule (/usr/lib/node_modules/gassistant-fhem/lib/cli.js:13:13)
at Object.<anonymous> (/usr/lib/node_modules/gassistant-fhem/lib/cli.js:16:18)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
Loading cli.js...
/usr/lib/node_modules/gassistant-fhem/node_modules/vm2/lib/main.js:157
if (!code.startsWith('#!')) return code;
^
TypeError: code.startsWith is not a function
at removeShebang (/usr/lib/node_modules/gassistant-fhem/node_modules/vm2/lib/main.js:157:12)
at NodeVM.jsCompiler (/usr/lib/node_modules/gassistant-fhem/node_modules/vm2/lib/main.js:120:9)
at NodeVM.run (/usr/lib/node_modules/gassistant-fhem/node_modules/vm2/lib/main.js:1154:11)
at getModule (/usr/lib/node_modules/gassistant-fhem/lib/cli.js:13:13)
at Object.<anonymous> (/usr/lib/node_modules/gassistant-fhem/lib/cli.js:16:18)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
Habe das gleiche Problem. Konntest Du eine Lösung finden?
Einfach die kaputte Zeile im main.js wie folgt anpassen:
function removeShebang(code) {
if (!String(code).startsWith('#!')) return code;