Skip to content
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

NextJS 14 build failed #343

Open
HolingHoman opened this issue Nov 20, 2023 · 5 comments
Open

NextJS 14 build failed #343

HolingHoman opened this issue Nov 20, 2023 · 5 comments
Assignees

Comments

@HolingHoman
Copy link

suneditor: 2.45.1,
suneditor-react: 3.6.1,
nextjs: 14.0.3

After updating to Next 14, I encounter difficulties in assembling the project, particularly when integrating the "suneditor-react" module.

`Failed to compile.

static/chunks/11a89e4f.0050b8fb57f7c002.js from Terser
x Expected ';', '}' or
,-[1176:1]
1176 | * @returns {Node}
1177 | */
1178 | getSelectionNode: function () {
1179 | if (!context.element.wysiwyg.contains(this._variable._selectionNode)) this._editorRange();
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^|^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^
: -- This is the expression part of an expression statement 1180 | if (!this._variable._selectionNode) { 1181 | const selectionNode = util.getChildElement(context.element.wysiwyg.firstChild, function (current) { return current.childNodes.length === 0 || current.nodeType === 3; }, false); 1181 | if (!selectionNode) { ----

Caused by:
0: failed to parse input file
1: Syntax Error
Error:
x Expected ';', '}' or
,-[1176:1]
1176 | * @returns {Node}
1177 | */
1178 | getSelectionNode: function () {
1179 | if (!context.element.wysiwyg.contains(this._variable._selectionNode)) this._editorRange();
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^|^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^
: -- This is the expression part of an expression statement 1180 | if (!this._variable._selectionNode) { 1181 | const selectionNode = util.getChildElement(context.element.wysiwyg.firstChild, function (current) { return current.childNodes.length === 0 || current.nodeType === 3; }, false); 1181 | if (!selectionNode) { ----

Caused by:
0: failed to parse input file
1: Syntax Error

Build failed because of webpack errors
Creating an optimized production build`

@iveretelnyk
Copy link

having same issue, but error coming from suneditor. If you clone their git repo, you will see it have some strange characters(hidden) instead of whitespaces.

@aka-bassman
Copy link

same issue

@kadowning1
Copy link

same issue. it won't complete the build

@mobyere
Copy link

mobyere commented Jan 4, 2024

Same issue.

Is there any update planned to resolve it ?

@iveretelnyk
Copy link

Same issue.

Is there any update planned to resolve it ?

It does not related to this repository. Fix already merged to suneditor repository, but not released still.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants