This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
Closed
need help with installing modules
MarcelTimmermans
Member
in Archive
Hi,
I am just to begin programming on Homey. I am new to Node.js but I manage until now. I am busy learning building a Homey App and I want to use the parser Cheerio.
When I install this module using:
npm install cheerio (need to parse some html)
a number of modules will be installed and I am not able to run my app anymore on Homey. After downloading I get and socket error.
Does this mean the package is to big? Is this the right way to install the modules or there already pre-installed modules on homey?
for example if I install the module request. I get also a number of extra modules but in the buienradar app there is only one module request.
Or did I miss some documentation...
I am just to begin programming on Homey. I am new to Node.js but I manage until now. I am busy learning building a Homey App and I want to use the parser Cheerio.
When I install this module using:
npm install cheerio (need to parse some html)
a number of modules will be installed and I am not able to run my app anymore on Homey. After downloading I get and socket error.
Does this mean the package is to big? Is this the right way to install the modules or there already pre-installed modules on homey?
for example if I install the module request. I get also a number of extra modules but in the buienradar app there is only one module request.
Or did I miss some documentation...
This discussion has been closed.
Comments
That cheerio module is BIG! 10 mb. I have no problem running it on homey though. But you can consider using only htmlparser for it is just 250 kb. It makes debugging where you stop/start your app a lot much faster.
Try finding module that do not require native extension.
Regarding multiple modules: You're probably using npm 3 which install all packages in root node_modules (including dependencies of dependencies). Npm 2 does not flatten modules and creates separate node_modules for each package.
As for the size, I don't know if there is any apps limitation, but smaller is faster and in keeps more space for data and other apps.