How it works...
The preceding code will install the Node.js package into your image. However, most times we only need to add our Node.js application and add Node.js as a dependency.
We can add simple Node.js scripts, as we explained in Adding data, scripts or configuration files, in Chapter 3, The Software Layer, with a recipe that just installs the JavaScript scripts in the root filesystem.
However, Node.js applications are usually built on modules, each one of them with its own license. We could create a Yocto recipe that uses the npm tool to install dependencies, but we would also need to manually trace all their different licenses.
The devtool command-line utility can do this for us automatically either installing from the npm registry ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access