Skip to content

Validate the versions of nativescript-dev-webpack plugin and NativeScript CLI #4798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Fatme opened this issue Jul 3, 2019 · 0 comments
Closed
Assignees
Labels

Comments

@Fatme
Copy link
Contributor

Fatme commented Jul 3, 2019

Validate the version of nativescript-dev-webpack plugin

NativeScript CLI 6.0 cannot work with nativescript-dev-webpack with version lower than 1.0.0. So we need a validation to check the version of nativescript-dev-webpack plugin on every prepare related command. The following error will be thrown when the version of nativescript-dev-webpack is lower than 1.0.0 (for example, "~0.24.0"):

The NativeScript CLI requires nativescript-dev-webpack 1.0.0 or later to work properly. After updating nativescript-dev-webpack you need to ensure "webpack.config.js" file is up to date with the one in the new version of nativescript-dev-webpack. You can automatically update it using "./node_modules/.bin/update-ns-webpack --configs" command.

The error is NOT thrown in the following situations:

  • When the version of nativescript-dev-webpack is not a valid semver version (for example: next, rc)
  • When nativescript-dev-webpack plugin is referenced from local .tgz or directory
  • When the version of nativescript-dev-webpack is for example 1.0.0-rc-2019-07-02-164330-03

Validate the version of NativeScript CLI

nativescript-dev-webpack plugin 1.0.0 cannot work with CLI with version lower than 6.0.0. So we need a validation to check the version of NativeScript CLI when [email protected] is used. The following error will be thrown when CLI with version lower than 6.0.0 is used:

The current version of nativescript-dev-webpack (<version>) is not compatible with the used CLI: <cli version>. Please upgrade your NativeScript CLI version (npm i -g nativescript).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants