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.
Closed

Node JS dependencies

Dear Developers, 

I was looking at the created Homey Apps on Github and i was wondering how dependencies are managed throughout Apps. The library itself has a package.json defining dependencies. But others have complete libraries checked into the repository (example).
Mainly the second part looks a bit odd to me.

Any insights? 

Comments

  • EmileEmile Administrator, Athom
    Apps must check-in their dependencies, because Homey or the App Store does not do an npm install. This makes sure that apps keep working, even if a dependency changes or is removed from the registry.
  • Ah very well, will do. 

    To follow up on that, a Homey app has a app.json wich consists of Homey specific information but also some features used in a standard package.json. Like dependencies, But npm can't read an app.json file by default. What workflow do you use to pull dependencies or later on update a dependency on an existing project. 
  • So what's the point of app.json dependencies?
  • EmileEmile Administrator, Athom
    I advice to add a package.json as well to manage dependencies. 
This discussion has been closed.