Skip to content

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"
        }
    }
}
  • Use the latest value to use npm version 10.

  • Use the legacy value to use npm version 6.

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.json file of the template includes Git dependencies, eWizard CLI uses the legacy npm version.

  • If the package.json file of the template doesn't include Git dependencies, eWizard CLI uses the latest npm 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.json is in the template, eWizard runs npm ci during wiz install. This performs a clean install of components.

  • If package-lock.json isn't in the template, eWizard runs npm install during wiz install as 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.