-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fabric is undefined in test environment #134
Comments
@yashikagarg13 |
Example Code: App.js
App.test.js
Application created using |
@junghwan-park anything about this? |
@yashikagarg13 Sorry for your inconvenience. |
@junghwan-park I have |
I have the same problem. I have fabric installed (in the package.json I have postInstall)
And when I require the ImageEditor:
I get an error:
The error leads to this line:
In my case, I'm trying to load editor in Elector renderer, not in the tests. Does nobody else has this error? |
Yes. Just tried to take this library for a spin, like so:
// app.js
import ImageEditor from 'tui-image-editor'; ⬇︎
|
has anyone fixed this? I'm getting it in my react app. I have included fabric@^1.6.7, and imported it before tui-image-editor, and still get the error |
if anyone is still struggling with this, I managed to get it working by creating a new Next, I replaced every mention of Finally, I declared a global ImageEditor before the tui code begins. This can also be bound to the window, I have no idea why fabric wouldn't work for me, but that's how i forced it. |
…ion (fix nhn#129, nhn#134, nhn#219) (nhn#234) * fix: Resolve jQuery vulnerability * fix: Change fabric import method named to default & correct webpack external config (fix nhn#129, nhn#219) * fix: Add fabric.js to external library into karma webpack config (fix nhn#134) * fix: Add half stroke width to center added icon's left, top
Version
3.3.0
Development Environment
Browser: Chrome
OS: MacOS
Current Behavior
Getting below error message when writing a test for an ES6 module requiring 'tui-image-editor'.
Using Jest for writing tests
Expected Behavior
It should not raise above error
The text was updated successfully, but these errors were encountered: