Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

0.4.2: diffie-hellman cannot find ./lib/primes #19

Open

Description

@seanadkinson

Hello,

Looks like the update from a couple hours ago could be bringing in a bug with a downstream dependency.

Dependencies go:

  • webpack 1.5.1 depends on node-libs-browser ~0.4.0
  • node-libs-browser 0.4.2 depends on crypto-browserify ^3.9.13
  • crypto-browserify 3.9.13 depends on diffie-hellman ^3.0.1
  • diffie-hellman 3.0.1 breaks

Error in browser is: Cannot find module "./lib/primes", which is required from diffie-hellman/browser.js

Looks like there exists a ./lib/primes.json in that package, so maybe configuring webpack to auto check ".json" suffixes would work, I'll try that.

Will also learn about npm-shrinkwrap after this.

Any other tips for resolving issue? Thank you.

Activity

  1. seanadkinson commented on Mar 4, 2015

    @seanadkinson
    Author

    To downgrade and workaround temporarily (for anyone else that finds this thread and has the same issue:

    npm install --save [email protected]
    rm -Rf node_modules/webpack
    npm install
    

    This will add an explicit dependency in your package.json for [email protected], so be sure to remove in that future when this issue is resolved.

  2. added a commit that references this issue on Mar 5, 2015
  3. dozoisch commented on Apr 1, 2015

    @dozoisch

    @sokra This was kind of unexpected from upgrading my old webpack version! (1.5.3)... Everything that I have that relied on that crypto shim is now broken. The version there doesn't have any AES function implemented!

    Adding an explicit dep to my package.json for [email protected] fixed it.

  4. vihangm commented on Jan 26, 2016

    @vihangm
  5. pruett commented on Apr 28, 2016

    @pruett

    I receive this same error using v2.1.0-beta6. has this been fixed?

  6. UnsungHero97 commented on May 17, 2016

    @UnsungHero97

    still broken in [email protected]. my workaround for the moment is adding the json-loader:

    const JSON_LOADER = {
      loader: 'json',
      test: /\.json$/,
      include: [
        /node_modules/
      ]
    };
    
  7. jorawarsingh commented on Jul 9, 2016

    @jorawarsingh

    @UnsungHero97 this work well just want to point that by defualt node_modules are included so you don't need to add
    include: [
    /node_modules/
    ]

  8. terinjokes commented on Aug 16, 2016

    @terinjokes
    Contributor

    @UnsungHero97 The version of node-libs-browser used by Webpack 2 was updated back in January (unfortunately, the v1 branch still hasn't upgraded). In any case, by the time 2.1.0-beta.7 was released the version of crypto-browserify should have had the fixes need for diffie-hellman.

    If you're still having the problem, can you give the "crypto-browserify" portion of the tree output from npm ls? I'd really like to hunt it down and resolve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions