ern add <packages..>
--dev/-d
devDependencies
--peer/-p
peerDependencies
--manifestId <manifestId>
ern add <packages..>
command is the ern
equivalent of yarn add
and npm install
When you work with a MiniApp, always use ern add
to add packages in place of yarn add
or npm install
.npm
or yarn
) to be used by this command to add the package. This can be done by adding or updating packageManager
field in the ern
object kept in the MiniApp package.json. For example, to use npm
. If this field is missing from the configuration, yarn
will be used over npm
if it is installed on the workstation.ern add <packages..>
command performs compatibility checks before adding the package to the project.ern add
as the version to use will be retrieved from the Manifest. If you add an explicit version for a package, it will be ignored.ern add <packages>
command performs the following checks:ern
installs the package at the version declared in the manifest.