es6-promise: 2.1.0 requires vertx, but it is not a dependency in package.json

I get an error like this when using axios, and it seems to come from this library.

"./~/axios/~/es6-promise/dist/es6-promise.js
Module not found: Error: Cannot resolve module 'vertx' in /home/user/workspaces/company/project/node_modules/axios/node_modules/es6-promise/dist
resolve module vertx in /home/user/workspaces/company/project/node_modules/axios/node_modules/es6-promise/dist
  looking for modules in /home/user/workspaces/company/project/node_modules/axios/node_modules
    /home/user/workspaces/company/project/node_modules/axios/node_modules/vertx doesn't exist (module as directory)
    resolve 'file' vertx in /home/user/workspaces/company/project/node_modules/axios/node_modules
      resolve file
        /home/user/workspaces/company/project/node_modules/axios/node_modules/vertx doesn't exist
        /home/user/workspaces/company/project/node_modules/axios/node_modules/vertx.js doesn't exist
        /home/user/workspaces/company/project/node_modules/axios/node_modules/vertx.json doesn't exist
  looking for modules in /home/user/workspaces/company/project/node_modules
    /home/user/workspaces/company/project/node_modules/vertx doesn't exist (module as directory)
    resolve 'file' vertx in /home/user/workspaces/company/project/node_modules
      resolve file
        /home/user/workspaces/company/project/node_modules/vertx doesn't exist
        /home/user/workspaces/company/project/node_modules/vertx.js doesn't exist
        /home/user/workspaces/company/project/node_modules/vertx.json doesn't exist
  looking for modules in /home/user/node_modules
    /home/user/node_modules/vertx doesn't exist (module as directory)
    resolve 'file' vertx in /home/user/node_modules
      resolve file
        /home/user/node_modules/vertx doesn't exist
        /home/user/node_modules/vertx.js doesn't exist
        /home/user/node_modules/vertx.json doesn't exist
[/home/user/workspaces/company/project/node_modules/axios/node_modules/vertx]
[/home/user/workspaces/company/project/node_modules/axios/node_modules/vertx]
[/home/user/workspaces/company/project/node_modules/axios/node_modules/vertx.js]
[/home/user/workspaces/company/project/node_modules/axios/node_modules/vertx.json]
[/home/user/workspaces/company/project/node_modules/vertx]
[/home/user/workspaces/company/project/node_modules/vertx]
[/home/user/workspaces/company/project/node_modules/vertx.js]
[/home/user/workspaces/company/project/node_modules/vertx.json]
[/home/user/node_modules/vertx]
[/home/user/node_modules/vertx]
[/home/user/node_modules/vertx.js]
[/home/user/node_modules/vertx.json]
 @ ./~/axios/~/es6-promise/dist/es6-promise.js 125:20-30"

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 2
  • Comments: 16 (4 by maintainers)

Most upvoted comments

Instead of dynamically attempting to load vertx to see if it is installed we could just make possible to pass a vertx implementation. This could be part of some configuration function call. This solves issues with bundlers and makes the usage of vertx by this library more explicit. It seems webpack is just a bit smarter than browserify if it understands this code.

So what about getting rid of a JVM dependeny definetly only a small portion of people are using?

Or at least requiring it in a way, it won’t throw errors/warnings on a “normal” build process with babel & some bundler? (webpack, rollup, …)

@stefanpenner sorry for raising that one again, but not everyone is using webpack to pack for browser only.

Can you describe what that vertx package does, why it is not in the dependencies and why i can’t find it at all in the internet? Its not on npm, can’t find it on github etc.

Can’t we not just remove it from the project? I dislike warnings in my build process a lot.

Why is this closed? still an issue.

Can we at least document this? This module is a transitive dependency of my project. My build doesn’t provide any useful information when it fails. I spent 5 hours tracking down the issue and finally I see https://github.com/stefanpenner/es6-promise/issues/106#issuecomment-291880878 and understand what’s going on.

@Undistraction. Here is our workaround:

new webpack.IgnorePlugin(/vertx/)

“Done”