stealjs/steal

Improve warning when dependency versions conflict

Open

#1,391 opened on May 4, 2018

View on GitHub
 (0 comments) (1 reaction) (0 assignees)JavaScript (1,367 stars) (574 forks)batch import
error messageshelp wanted

Description

Below is a warning @eben-roux came across when using can-validate-validatejs: https://gitter.im/canjs/canjs?at=5aec8531da323a7c04f8b333

warning

The issue was that he had validate.js 0.12 installed in his project but can-validate-validatejs needed ^0.11.1

From the info provided in the warning, it seems like steal could maybe detect this scenario and offer a better warning. An idea that needs some work:

Multiple versions of the module with address ~/node_modules/validate.js/validate.js are being imported.

Modules:
  validate.js@0.12.0#validate
    - ~/src/main.js
  validate.js@0.11.1#validate
    - can-validate-validatejs

HINT: Check the semver ranges of your project and its dependencies.
Learn more at https://stealjs.com/docs/StealJS.error-messages.html#multiple-versions

Contributor guide

Improve warning when dependency versions conflict · stealjs/steal#1391 | Good First Issue