Appearance
Latest and legacy npm versions
eWizard CLI supports two npm versions: 6 and 10. The npm version affects the wiz install and wiz uninstall commands.
You can configure the npm version in the cli.npm.version object of the template system settings.
json
// ./ewizard/settings.json
{
"cli": {
"npm": {
"version": "latest"
}
}
}As best practice, don't use the latest value if the template includes Git dependencies, as it may cause errors and slow down the installation.
When cli.npm.version isn't configured in .ewizard/settings.json, eWizard CLI detects what version to use when you run wiz install or wiz uninstall.
If the
package.jsonfile of the template includes Git dependencies, eWizard CLI uses thelegacynpm version.If the
package.jsonfile of the template doesn't include Git dependencies, eWizard CLI uses thelatestnpm version.
Latest
In the latest npm version, wiz install supports clean install.
When you run wiz install without additional options, eWizard checks if the package-lock.json file is in the template. This affects the wiz install command in the following ways:
If
package-lock.jsonis in the template, eWizard runsnpm ciduringwiz install. This performs a clean install of components.If
package-lock.jsonisn't in the template, eWizard runsnpm installduringwiz installas in the legacy npm version.
When you install a specific component with wiz install, it always runs npm install as in the legacy npm version.
For example, running wiz install @edetailer/wiz-accordion creates the @edetailer/wiz-accordion dependency in package.json.
json
// ./package.json
{
"dependencies": {
"@edetailer/wiz-accordion": "^3.0.0",
}
}Legacy
In the legacy npm version, eWizard always runs npm install during wiz install.
The wiz install command might update existing dependencies to newer versions based on the specified semver ranges in your package-lock.json file.