tui.image-editor: Can't resolve 'Fabric/fabric.require' in node_modules.
Module not found: Error: Can’t resolve ‘fabric/dist/fabric.require’ in ‘.\node_modules\tui-image-editor\dist’
I’ve already looked at former issues with fabric, these are not fixing the problem.
Version
“tui-image-editor”: “^3.2.2” Angular 6.1.0 Node 8.11 Tried with fabric 1.6.7 and 2.4.2
// Write example code
instance = new ImageEditor(document.querySelector('#tui-image-editor'),
{ cssMaxWidth: 700, cssMaxHeight: 500, selectionStyle: { cornerSize: 20, rotatingPointOffset: 70 }
});
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 15 (2 by maintainers)
There is no
fabric.require.jsinfabric/dist/, there is onlyfabric.jsbut tui-image editor is still looking forfabric.requireCould somebody finally please fix this? The suggested workarounds did not help in my case.
Inside node modules, I don’t know If there are problems when deploying, but it let me work for the moment
this seems to be a work-around
“Fixed” the problem by replacing
HTTP = require("http"), HTTPS = require("https")intoHTTP = require("@angular/http"), HTTPS = require("@angular/http")in the fabric.require.js file.