Git Product home page Git Product logo

Comments (7)

coder5876 avatar coder5876 commented on June 3, 2024

Hi @simov, this is the error I'm getting:

"Uncaught Error: More than one instance of bitcore-lib found. Please make sure to require bitcore-lib and check that submodules do not also include their own bitcore-lib dependency."

This happens in the browser when I do require('bitcore-lib') in the source and add bitcore-lib in package.json. Did you try doing this with NPM3?

from eth-lightwallet.

simov avatar simov commented on June 3, 2024

It seems that they are checking for version mismatch, not for multiple instances in general, which is good.

As long as you have your dependency set in the exact same way as it is set in bitcore-mnemonic

"bitcore-lib": "^0.13.7"

it should work.

When using NPM2 it should download the latest version in both places, which currently is 0.13.11.

When NPM3 flattens out the directory structure it will create just one instance of the module under the root of node_modules, if both versions matches.

You need to npm update in your project's dir after you update your package.json, or just remove node_modules and make a clean install just to be sure.

from eth-lightwallet.

coder5876 avatar coder5876 commented on June 3, 2024

Ah, ok, that makes sense. I'll try that!

from eth-lightwallet.

simov avatar simov commented on June 3, 2024

No idea how is this going to work in the browser btw, but I'm assuming browserify relies on what npm offers.

from eth-lightwallet.

coder5876 avatar coder5876 commented on June 3, 2024

@simov OK, I tried your suggestion and it works now! Thanks so much! I'm pushing out a large upgrade today, and I'll make sure to include this fix.

from eth-lightwallet.

coder5876 avatar coder5876 commented on June 3, 2024

@simov I pushed a change that should fix it. I haven't updated to NPM 3 yet, would be thankful if you could test it on your end. Cheers!

from eth-lightwallet.

simov avatar simov commented on June 3, 2024

Seems to be working, thanks for the quick response 👍

As for node and npm versions you can use nvm for that.

from eth-lightwallet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.