virtualzone/landroid-bridge

npm run grunt does not work

Closed this issue · 2 comments

After last merge on May 21, "npm run grunt" fails (previous commit works, though).

/tmp/landroid-bridge$ [master=] npm run grunt

> landroid-bridge@0.1.0 grunt /tmp/landroid-bridge
> grunt

Running "tslint:files" (tslint) task
>> 17 files lint free.

Running "ts:app" (ts) task
Compiling...
Cleared fast compile cache for target: app
Using tsc v3.4.5
>> Warning: created src/.baseDir.ts file because `outDir` was specified in the Gruntfile ts `options`, but not `rootDir`.  Add `rootDir`  under the task or target `options` object to fix this warning.
src/LandroidS.ts(180,82): error TS2304: Cannot find name 's'.

>> 1 non-emit-preventing type warning  
>> Error: tsc return code: 2
Warning: Task "ts:app" failed. Use --force to continue.

Aborted due to warnings.
npm ERR! code ELIFECYCLE
npm ERR! errno 3
npm ERR! landroid-bridge@0.1.0 grunt: `grunt`
npm ERR! Exit status 3
npm ERR! 
npm ERR! Failed at the landroid-bridge@0.1.0 grunt script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/.../.npm/_logs/2019-05-23T08_59_19_629Z-debug.log

I'm not fluently in node but seems that the following line on LandroidS.ts is not right.
this.log.error("Invalid MQTT payload for topic %s", payload %s, topic, payload);

I can confirm. Same error on a clean Raspberry ARMv7 install.

Preliminary fix:
Change line 180 of src/LandroidS.ts in: this.log.error("Invalid MQTT payload for topic %s", topic);