werthdavid / homebridge-weather

OpenWeatherMap Plugin for Homebridge
MIT License
104 stars 7 forks source link

Install issue #17

Closed rgerr closed 6 years ago

rgerr commented 6 years ago

Receiving the following error when installing the plug-in with sudo npm install -g homebridge-weather (also with —unsafe perm).

npm ERR! Linux 4.14.30-v7+ npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "homebridge-weather" npm ERR! node v7.10.1 npm ERR! npm v4.2.0 npm ERR! file /root/.npm/homebridge-weather/1.8.0/package/package.json npm ERR! code EJSONPARSE

npm ERR! Failed to parse json npm ERR! No data, empty input at 1:1 npm ERR! npm ERR! ^ npm ERR! File: /root/.npm/homebridge-weather/1.8.0/package/package.json npm ERR! Failed to parse package.json data. npm ERR! package.json must be actual JSON, not just JavaScript. npm ERR! npm ERR! This is not a bug in npm. npm ERR! Tell the package author to fix their package.json file. JSON.parse

npm ERR! Please include the following file with any support request: npm ERR! /root/.npm/_logs/2018-04-09T08_09_17_237Z-debug.log

werthdavid commented 6 years ago

From stackoverflow:

Just type npm cache clean on prompt and all the things must to work again.

rgerr commented 6 years ago

Managed to install it anyway via sudo -E -n npm install homebridge-weather@latest. Thanks!