ERROR in ./node_modules/image-size/lib/index.js
See original GitHub issuePlotly.js version: 1.58.4 Platform: mac bis sur
When upgrading plotly from 1.52.2 to 1.58.4 a new error appears when trying to run it in a react webpage:
ERROR in ./node_modules/image-size/lib/index.js
Module not found: Error: Can't resolve 'fs' in '/local/home/xxx/node_modules/image-size/lib'
@ ./node_modules/image-size/lib/index.js 3:9-22
@ ./node_modules/plotly.js/src/traces/image/helpers.js
@ ./node_modules/plotly.js/src/traces/image/calc.js
@ ./node_modules/plotly.js/src/traces/image/index.js
@ ./node_modules/plotly.js/lib/image.js
@ ./node_modules/plotly.js/lib/index.js
@ ./src/util/ui/MultiChart.js
@ ./src/xxx/xxx.js
@ ./src/App.js
@ ./src/index.development.js
Is there some new dependency which needs to be added?
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (9 by maintainers)
Top Results From Across the Web
Module not found: Error: Can't resolve 'fs' in - Stack Overflow
I deleted all the packes(node_modules) and did a npm install. i Still get this three errros: ERROR in ./node_modules/resolve/lib/async. js ...
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
To fix the error, you need to install the package that is absent in your project directory – npm install package-name or yarn...
Read more >Node.js v19.3.0 Documentation
Indicates the failure of an assertion. All errors thrown by the node:assert module will be instances of the AssertionError class. new assert.AssertionError( ...
Read more >Jimp - npm
An image processing library for Node written entirely in JavaScript, with zero native dependencies. The default jimp configuration. Supported ...
Read more >Top 10 Most Common Node.js Developer Mistakes - Toptal
The distinction here between “module.exports” and “exports” is very important, and is often a cause of frustration among new Node.js developers. Mistake #6: ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Wasn’t quite sure how you meant to change the encoding (in the header of the index.html ?). Therefore I searched, found and followed the advice from someone who already had this issue. They used the minified version which turned out to be working fine.
With this in place, I can gladly confirm that the latest build does not throw any ‘fs’ related errors anymore!
Compiled successfully.
Thanks to all for the quick turnaround. This is in part what makes plotly a great library (on which one can rely upon). Thanks
@rreusser simply FYI we are using
image-size@0.7.5
notimage-size@@0.9.3
which liked above. Suggestions are welcome : )