You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Webpack] Module not found: Error: Can't resolve 'vertx' in '/home/user/app/node_modules/plotly.js/dist' #2466
Exact same issue with ./node_modules/plotly.js/dist/plotly.min.js and ./node_modules/plotly.js/dist/plotly.js as well. Module not found: Error: Can't resolve 'vertx' in '/home/user/app/node_modules/plotly.js/dist'
But, to note, I am now getting too many WebGL contexts in the console, where as before I wasn't. Not sure if this is related, but it did pop up with the 1.35.1 and this warning.
@etpinard I didn't really think it would be, but thought I would note it JIC.
As for reproducible code, here is a codepen. This isn't exactly what happens in my app, but it is similar. In the pen's console you'll see the following on the first button click, but not after that. Error: WebGL warning: Exceeded 16 live WebGL contexts for this principal, losing the least recently used one.
In my app, which uploads a dataset, it prints the following on the third time a dataset is uploaded. WARNING: Too many active WebGL contexts. Oldest context will be lost.
Oh, wow. Now I can't reproduce it either with that codepen. I'm sorry about that. I guess it must be something specific to application setup. Thanks for looking @etpinard.
Since v1.35.x, I'am also get a huge warning. It is used in Angular (angular-cli) project:
WARNING in ./node_modules/plotly.js/dist/plotly.js
Module not found: Error: Can't resolve 'vertx' in 'C:\SoftwareProjekte\Hugos\grafioschtrader\grafioschtraderClient\node_modules\plotly.js\dist'
resolve 'vertx' in 'C:\SoftwareProjekte\Hugos\grafioschtrader\grafioschtraderClient\node_modules\plotly.js\dist'
Parsed request is a module
using description file: C:\SoftwareProjekte\Hugos\grafioschtrader\grafioschtraderClient\node_modules\plotly.js\package.json (relative path: ./dist)
Field 'browser' doesn't contain a valid alias configuration
after using description file: C:\SoftwareProjekte\Hugos\grafioschtrader\grafioschtraderClient\node_modules\plotly.js\package.json (relative path: ./dist)
resolve as module
...
The error is from the es6 promise shim. Discussed here #100 and here #305.
I had to add
new webpack.IgnorePlugin(/vertx/)
to my plugins to squelch the warning. Other things mentioned in the two discussions did not work. I'm still on webpack 3.10 and started getting this when updating to plotly.js 1.35.2 a few days ago.
Reacted by etpinard, Rafal Bromirski, Marcus, Julian Claus, Nicolas Kruchten, Nick Brady, Rémi Lafage, Denis Savenok, Thomas Schoffelen, samkessaram and 1 more
experiencing the same issue during compile time. Application and Plotly components all work fine. For me it comes with another warning, which may or may not be related.
WARNING in ./~/plotly.js/dist/plotly.js
Critical dependencies:
145202:31-39 This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.
@ ./~/plotly.js/dist/plotly.js 145202:31-39
WARNING in ./~/plotly.js/dist/plotly.js
Module not found: Error: Can't resolve 'vertx' in '<project path>\node_modules\plotly.js\dist'
@ ./~/plotly.js/dist/plotly.js 60182:16-26
It is a prebuilt file. My recollection is that Uglify, which is smarter than webpack, was loading a module from es6 shim that was not transpiled, causing it to choke in release builds as soon as it encountered an es6 keyword such as let or const, or something like that. To mitigate this, react-plotly.js was tweaked to load the prebuilt file, which is all in es5. What bundler and version are you using?
changed the title [-]Module not found: Error: Can't resolve 'vertx' in '/home/user/app/node_modules/plotly.js/dist'[/-][+][Webpack] Module not found: Error: Can't resolve 'vertx' in '/home/user/app/node_modules/plotly.js/dist'[/+]on Apr 16, 2018
A community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort.
Sponsorship range: $10k-$15k
What Sponsorship includes:
Completion of this feature to the Sponsor's satisfaction, in a manner coherent with the rest of the Plotly.js library and API
Tests for this feature
Long-term support (continued support of this feature in the latest version of Plotly.js)
Activity
brussee commentedon Mar 9, 2018
Exact same issue with
./node_modules/plotly.js/dist/plotly.min.jsand./node_modules/plotly.js/dist/plotly.jsas well.Module not found: Error: Can't resolve 'vertx' in '/home/user/app/node_modules/plotly.js/dist'nicolaskruchten commentedon Mar 9, 2018
Just to confirm: this is showing up as a warning, and compilation proceeds, right?
chiaramdelucia commentedon Mar 9, 2018
@nicolaskruchten I am having the same issue and yes, it is logging as a
warningand compilation proceeds.chiaramdelucia commentedon Mar 9, 2018
But, to note, I am now getting too many WebGL contexts in the console, where as before I wasn't. Not sure if this is related, but it did pop up with the 1.35.1 and this warning.
etpinard commentedon Mar 9, 2018
That shouldn't be related. @chiaramdelucia would you mind sharing a reproducible example? Thank you!
chiaramdelucia commentedon Mar 9, 2018
@etpinard I didn't really think it would be, but thought I would note it JIC.
As for reproducible code, here is a codepen. This isn't exactly what happens in my app, but it is similar. In the pen's console you'll see the following on the first button click, but not after that.
Error: WebGL warning: Exceeded 16 live WebGL contexts for this principal, losing the least recently used one.In my app, which uploads a dataset, it prints the following on the third time a dataset is uploaded.
WARNING: Too many active WebGL contexts. Oldest context will be lost.etpinard commentedon Mar 9, 2018
Hmm. I can't replicate. Can anyone else try out @chiaramdelucia 's codepen?
chiaramdelucia commentedon Mar 9, 2018
Oh, wow. Now I can't reproduce it either with that codepen. I'm sorry about that. I guess it must be something specific to application setup. Thanks for looking @etpinard.
tsaiDavid commentedon Mar 9, 2018
I'm actually experiencing the same issue -
plotly.jsis on1.35.2react-plotly.jsis on1.7.0I'm trying to test this in a development environment - we're using
webpack@3.5.2hugograf commentedon Mar 9, 2018
Since v1.35.x, I'am also get a huge warning. It is used in Angular (angular-cli) project:
etpinard commentedon Mar 9, 2018
The webpack issue has been confirmed. No need for anyone test it themselves. #2466 (comment) were referenring to another issue. Thanks.
brussee commentedon Mar 12, 2018
Yes, webpack presents it as a warning and is able to complete the compilation.
domehead100 commentedon Mar 14, 2018
The error is from the es6 promise shim. Discussed here #100 and here #305.
I had to add
new webpack.IgnorePlugin(/vertx/)
to my plugins to squelch the warning. Other things mentioned in the two discussions did not work. I'm still on webpack 3.10 and started getting this when updating to plotly.js 1.35.2 a few days ago.
elshuku commentedon Mar 28, 2018
experiencing the same issue during compile time. Application and Plotly components all work fine. For me it comes with another warning, which may or may not be related.
domehead100 commentedon Mar 29, 2018
It is a prebuilt file. My recollection is that Uglify, which is smarter than webpack, was loading a module from es6 shim that was not transpiled, causing it to choke in release builds as soon as it encountered an es6 keyword such as let or const, or something like that. To mitigate this, react-plotly.js was tweaked to load the prebuilt file, which is all in es5. What bundler and version are you using?
1 remaining item
etpinard commentedon Apr 13, 2018
also related: #2400
[-]Module not found: Error: Can't resolve 'vertx' in '/home/user/app/node_modules/plotly.js/dist'[/-][+][Webpack] Module not found: Error: Can't resolve 'vertx' in '/home/user/app/node_modules/plotly.js/dist'[/+]nicolaskruchten commentedon Apr 16, 2018
I've updated https://github.com/plotly/plotly-webpack to document the fact that the
IgnorePluginworkaround is the recommended fix for now.jackparmer commentedon Sep 10, 2020
This issue has been tagged with
NEEDS SPON$ORA community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort.
Sponsorship range: $10k-$15k
What Sponsorship includes:
Please include the link to this issue when contacting us to discuss.
archmoj commentedon Jan 14, 2021
This might be fixed by #5358.
alexcjohnson commentedon Jan 14, 2021
Yes, @archmoj feel free to close this issue.