stefanpenner / es6-promise

A polyfill for ES6-style Promises
MIT License
7.3k stars 593 forks source link

Can't resolve 'vertx' in electron app #321

Closed mhuggins closed 6 years ago

mhuggins commented 6 years ago

I'm trying to use es6-promise in an electron app, but there is a console warning with the following:

Module not found: Error: Can't resolve 'vertx' in '/Users/mhuggins/Development/neo/neon-wallet/node_modules/es6-promise/dist'
 @ ./node_modules/es6-promise/dist/es6-promise.js 140:16-26
 @ ./node_modules/es6-promisify/dist/promise.js
 @ ./node_modules/es6-promisify/dist/promisify.js
 ...

I see that the package.json for this package includes this entry:

"browser": {
  "vertx": false
},

Is fixing this issue for electron as easy as adding this entry as well?

"electron": {
  "vertx": false
},

In case it's relevant, the webpack target value is set to "electron".

stefanpenner commented 6 years ago

Is fixing this issue for electron as easy as adding this entry as well?

Not sure, can you share what code in electron is having trouble with this?

Maybe an example I can try out?

stefanpenner commented 6 years ago

In case it's relevant, the webpack target value is set to "electron".

Is this app built with webpack, if so it would be a duplicate of https://github.com/stefanpenner/es6-promise/issues/305

mhuggins commented 6 years ago

Yes, it's built with webpack. I wasn't clear if it falls under the same issue as that or not since it's an electron app. This can be closed if it's the same.

stefanpenner commented 6 years ago

Lets assume it does. I'm going to close.

I'm sick of this webpack issue, I'll try to find a reasonable solution shortly.

quarterioningot commented 4 years ago

Lets assume it does. I'm going to close.

I'm sick of this webpack issue, I'll try to find a reasonable solution shortly.

What was the solution?