Skip to content
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

Include more details in versionGuard message #1328

Closed
braydonf opened this issue Aug 26, 2015 · 4 comments
Closed

Include more details in versionGuard message #1328

braydonf opened this issue Aug 26, 2015 · 4 comments

Comments

@braydonf
Copy link
Contributor

A few things that could be helpful:

  • The locations of the conflicts (and relevant modules)
  • Link to documentation on how to setup symlinks for development purposes
  • Link to documentation about peerDependency-like dependency structure (see below)

Correct:

dependencies: {
  "bitcore-lib": "^0.13.7",
  "bitcore-ecies": "^1.0.2",
  "bitcore-payment-protocol": "^1.0.2",
  "bitcore-mnemonic": "^1.0.2",
  "bitcore-node": "^0.2.5",
}

Incorrect:

dependencies: {
  "bitcore-ecies": "^1.0.2",
  "bitcore-payment-protocol": "^1.0.2",
  "bitcore-mnemonic": "^1.0.2",
  "bitcore-node": "^0.2.5",
}

The above will include bitcore four separate times and lead to errors when objects are passed around between the modules.

  • It may also be useful to indicate which version of bitcore is supported via the major version number (currently unused)

Edit: Version numbers

@braydonf braydonf changed the title Include more details is versionGuard Include more details in versionGuard message Aug 26, 2015
@dabura667
Copy link

I used browserify on a module with both bitcore and bitcore-mnemonic as "dependencies". The final js file only had bitcore in there once (0.13.3). But called it multiple times, thus giving the error and failing to load the whole js file into the browser.

I agree that this error message needs to clarify a solution to prevent this.

How would I be able to fix my packages.json to allow me to build in browserify properly?

@braydonf
Copy link
Contributor Author

Using mocha with the --watch flag will have a similar issue, as the index.js is loaded again however the global state isn't refreshed.

As for the browserify issue, you may be able to use --external bitcore --external bitcore-mnemonic in the browserify command similar to how the submodules are browserified: https://github.com/bitpay/bitcore-build/blob/master/index.js#L106

@braydonf
Copy link
Contributor Author

braydonf commented Jan 6, 2016

Also as note, npm find-dupes bitcore-lib is useful for finding duplicates.

@braydonf
Copy link
Contributor Author

braydonf commented Jun 6, 2016

Moved to: bitpay/bitcore-lib#67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants