dherault / dherault/react-apple-emojis

Nextjs import error

Open
#20 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
64
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Hey,
I've added this package to a new plain Nextjs react app and it worked as expected, after a couple of reloads Nextjs threw the error below.
Searched a lot but didn't get a clean answer, but found a big interesting fight [here](https://github.com/vercel/next.js/issues/31518).
I am pretty sure that this error is Nextjs specific but it would be great if you can do something about it
```
Server Error
SyntaxError: Unexpected token 'export'

This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack

file:///C:/Users/alfawal/Documents/git/alfawal.dev/node_modules/react-apple-emojis/dist/index.js (1)
Object.compileFunction
node:vm (352:18)
wrapSafe
node:internal/modules/cjs/loader (1026:15)
Module._compile
node:internal/modules/cjs/loader (1061:27)
Object.Module._extensions..js
node:internal/modules/cjs/loader (1149:10)
Module.load
node:internal/modules/cjs/loader (975:32)
Function.Module._load
node:internal/modules/cjs/loader (822:12)
Module.require
node:internal/modules/cjs/loader (999:19)
require
node:internal/modules/cjs/helpers (102:18)
Object.react-apple-emojis
file:///C:/Users/alfawal/Documents/git/alfawal.dev/.next/server/pages/_app.js (42:18)
__webpack_require__
file:///C:/Users/alfawal/Documents/git/alfawal.dev/.next/server/webpack-runtime.js (33:42)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.