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

@udecode/plate-emoji 42.0.0 compile error #3978

Closed
re-ovo opened this issue Jan 14, 2025 · 0 comments · Fixed by #3982
Closed

@udecode/plate-emoji 42.0.0 compile error #3978

re-ovo opened this issue Jan 14, 2025 · 0 comments · Fixed by #3982
Labels
bug Something isn't working

Comments

@re-ovo
Copy link

re-ovo commented Jan 14, 2025

Description

error when building nextjs project:

Failed to compile.

./node_modules/@udecode/plate-emoji/dist/index.mjs:120:50
Syntax error: Support for the experimental syntax 'importAttributes' isn't currently enabled (120:51):

  118 |
  119 | // src/lib/utils/EmojiLibrary/EmojiInlineLibrary.ts
> 120 | import emojiMartData from "@emoji-mart/data" with { type: "json" };
      |                                                   ^
  121 | var EmojiInlineLibrary = class {
  122 |   _emojis;
  123 |   _hash = {};

Add @babel/plugin-syntax-import-attributes (https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes) to the 'plugins' section of your Babel config to enable parsing.

./node_modules/@udecode/plate-emoji/dist/react/index.mjs:123:50
Syntax error: Support for the experimental syntax 'importAttributes' isn't currently enabled (123:51):

  121 |
  122 | // src/lib/utils/EmojiLibrary/EmojiInlineLibrary.ts
> 123 | import emojiMartData from "@emoji-mart/data" with { type: "json" };
      |                                                   ^
  124 | var EmojiInlineLibrary = class {
  125 |   _emojis;
  126 |   _hash = {};

Add @babel/plugin-syntax-import-attributes (https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes) to the 'plugins' section of your Babel config to enable parsing.


> Build failed because of webpack errors
error: script "build" exited with code 1

Rolling back to 41.0.0 solved the problem

Reproduction URL

No response

Reproduction steps

install @udecode/plate-emoji 42.0.0 and build project

Plate version

42.0.0

Slate React version

0.112.0

Screenshots

No response

Logs

No response

Browsers

No response

@re-ovo re-ovo added the bug Something isn't working label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant