Tui.image-editor: Cannot read property 'forEach' of undefined

Created on 4 Aug 2020  路  3Comments  路  Source: nhn/tui.image-editor

Dear nhn

I just create one simple HTML page like this:

<...!DOCTYPE html>
<...html lang="en">
<...head>
< ...meta charset="UTF-8">
<...meta name="viewport" content="width=device-width, initial-scale=1.0">
... <...title>Document
... <...link rel="stylesheet" href="https://uicdn.toast.com/tui-image-editor/latest/tui-image-editor.css">
....<...script src="https://uicdn.toast.com/tui-image-editor/latest/tui-image-editor.js">

....<..../head>
...<....body>

....<...div id="tui-image-editor">

...<..../body>
....<.../html>

and I got the following issues. could you help to check? thanks.

VM225 util.js:89 Uncaught TypeError: Cannot read property 'forEach' of undefined
at keyMirror (VM225 util.js:89)
at eval (VM323 consts.js:48)
at Object../src/js/consts.js (VM219 tui-image-editor.js:1579)
at __webpack_require__ (VM219 tui-image-editor.js:36)
at eval (VM225 util.js:38)
at Object../src/js/util.js (VM219 tui-image-editor.js:2203)
at __webpack_require__ (VM219 tui-image-editor.js:36)
at eval (VM224 invoker.js:17)
at Object../src/js/invoker.js (VM219 tui-image-editor.js:1843)
at __webpack_require__ (VM219 tui-image-editor.js:36)

Bug

Most helpful comment

Hi, I faced this same issue and was able to solve it by using the following dependencies in order:

<link type="text/css" href="//uicdn.toast.com/tui-color-picker/v2.2.6/tui-color-picker.css" rel="stylesheet">
<link rel="stylesheet" href="https://uicdn.toast.com/tui-image-editor/v3.10.0/tui-image-editor.css">

<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/fabric.js/3.6.0/fabric.js"></script>
<script type="text/javascript" src="//uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.3/FileSaver.min.js"></script>
<script type="text/javascript" src="//uicdn.toast.com/tui-color-picker/v2.2.6/tui-color-picker.js"></script>
<script src="https://uicdn.toast.com/tui-image-editor/v3.10.0/tui-image-editor.js"></script>

It seems if you don't use all the dependencies or use the wrong versions which are incompatible with each other, then this issue occurs.

All 3 comments

Thank you for raising an issue.
We will try and get back to you as soon as possible.

Please make sure you have filled out issue respecting our form in English and given us as much context as possible. If not, the issue will be closed or not replied.

Put up and use the dependency module together. Reference. - #396

Hi, I faced this same issue and was able to solve it by using the following dependencies in order:

<link type="text/css" href="//uicdn.toast.com/tui-color-picker/v2.2.6/tui-color-picker.css" rel="stylesheet">
<link rel="stylesheet" href="https://uicdn.toast.com/tui-image-editor/v3.10.0/tui-image-editor.css">

<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/fabric.js/3.6.0/fabric.js"></script>
<script type="text/javascript" src="//uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.3/FileSaver.min.js"></script>
<script type="text/javascript" src="//uicdn.toast.com/tui-color-picker/v2.2.6/tui-color-picker.js"></script>
<script src="https://uicdn.toast.com/tui-image-editor/v3.10.0/tui-image-editor.js"></script>

It seems if you don't use all the dependencies or use the wrong versions which are incompatible with each other, then this issue occurs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

[Feature request] Round image crop
taimaiduc picture taimaiduc  路  3Comments

When crop picture the shadow is not correct
sj279811799 picture sj279811799  路  4Comments

Text Editor Cursor Position
aalpgiray picture aalpgiray  路  4Comments

Unable to edit text field
lightway82 picture lightway82  路  5Comments

Load Button in Image editor UI does not work/function in Firefox browser
Sai-Teja-Payyavula picture Sai-Teja-Payyavula  路  3Comments