HomeBridgeController
HomeBridgeController copied to clipboard
TypeError: chalk.stripColor is not a function error ?
My homebridge does not want to load anymore, i get this error and don't know how to fix it, any help would be great please.
Home-Mac-Mini:~ martinc$ homebridge [7/30/2017, 7:09:57 PM] Warning: skipping plugin found at '/usr/local/lib/node_modules/homebridge-controllerlink' since we already loaded the same plugin from '/Users/martinc/.nvm/versions/node/v4.2.4/lib/node_modules/homebridge-controllerlink'. /Users/martinc/.nvm/versions/node/v4.2.4/lib/node_modules/homebridge-controllerlink/lib/logger.js:93 return chalk.stripColor(line + log + '\n'); ^
TypeError: chalk.stripColor is not a function
at getLineString (/Users/martinc/.nvm/versions/node/v4.2.4/lib/node_modules/homebridge-controllerlink/lib/logger.js:93:15)
at Logger.queueLog (/Users/martinc/.nvm/versions/node/v4.2.4/lib/node_modules/homebridge-controllerlink/lib/logger.js:125:24)
at console.(anonymous function) (/Users/martinc/.nvm/versions/node/v4.2.4/lib/node_modules/homebridge-controllerlink/lib/logger.js:113:9)
at Logger.log (/Users/martinc/.nvm/versions/node/v4.2.4/lib/node_modules/homebridge/lib/logger.js:72:3)
at Logger.info (/Users/martinc/.nvm/versions/node/v4.2.4/lib/node_modules/homebridge/lib/logger.js:36:12)
at Server.
I am also getting this error! :(
Would love to have this back working, is the developer still active on this?
Getting this too.
Got it installed by removing the function (doesn't seem important).
Edit this file : (path from my nix container) /usr/local/lib/node_modules/homebridge-controllerlink/lib/logger.js
On line 93
Turn this :
return chalk.stripColor(line + log + '\n');
into this:
return line + log + '\n';
And no more error installing, it's running now. But the OS X app doesn't find it :D
Got it working now, had this issue. https://github.com/KraigM/HomeBridgeController/issues/64#issuecomment-258587001
So seems the fix I suggest doesn't break the plugin and should get you through.
Thank you for working on this, I am getting this error;
6/devices.json/ path.js:8 throw new TypeError('Path must be a string. Received ' + ^
TypeError: Path must be a string. Received undefined
at assertPath (path.js:8:11)
at Object.posix.resolve (path.js:426:5)
at Conf.loadPrefix (/Users/martinc/.nvm/versions/node/v4.2.4/lib/node_modules/homebridge-controllerlink/node_modules/npm/lib/config/load-prefix.js:43:14)
at load_ (/Users/martinc/.nvm/versions/node/v4.2.4/lib/node_modules/homebridge-controllerlink/node_modules/npm/lib/config/core.js:109:8)
at Conf.
Solution is in the link I've posted
Thank you, for some odd reason I have two homebridge folders, fold the one above made the changes you recommended and its working!