Open sracing opened 5 years ago
I'm not very deep in the node.js universe, but as far as I can see, a simple
npm update
should do the trick and update all your dependencies.
Maybe a
npm run grunt
after this may be a good idea to rebuild all.
No. I´m on node.js v8 as recommended in the readme.md and did the npm run grunt
any multiple times.
Not a expert as well, but see topic #3 in my manual fix - the package.json
file shows a dependency to a outdated version of https://github.com/MeisterTR/ioBroker.landroid-s
.
But npm update
updates all packages to the most recent version. On my system (with node.js 10) this also upgrades iobroker.landroid-s from 2.5.4 to 2.5.5.
Thanks, the tips herein solved that problem for me.
Strange, I have version 2.5.5 in my installation (confirmed with npm -l) and "import * as LandroidCloud from "iobroker.landroid-s/lib/mqttCloud";" in src. But still get this error..
It worked for a while but stopped working a few days ago.
I know the general understanding is that the latest pull resolves the "Unexpected token N in JSON at position 0" failure caused by the new API v2, but it did not work for me and a couple of other users that seem to have still problems.
I first tried a clean reinstall, but similar to other users I had build errors when installing node.js.
Let me tell you how I was able to fix it for my Raspberry by manual modification of the latest commit f45a42e (19 days ago):
1) Make sure you have the latest version of weweave/landroid-bridge (git pull) 2) In the src/LandroidS.ts file, make sure you have
import * as LandroidCloud from "iobroker.landroid-s/lib/mqttCloud";
(as noted in the pull request.) 3) Editpackage.json
file from:"iobroker.landroid-s": "^2.5.4",
to"iobroker.landroid-s": "^2.5.5",
4) Runsudo npm run grunt
to recompile5) However, that still does not pull the latest version 2.5.5 of the iobroker.landroid-s adapter, so you need to manually replace all the files from your local landroid-bridge\node_modules\iobroker.landroid-s directory with the files from
https://github.com/MeisterTR/ioBroker.landroid-s
.6) Restart your landroid-bridge.service (e.g.
node dist/server.js
)That Landroid-Bridge provides a solid MQTT bridge to anybody in smarthome applications, maybe someone can check on the needed modifications to ensure it is installe properly (at least the package.json seem to need a change to reference to dependency 2.5.5.)