i7eo / google-translate-select

🚀 A modern, high-performance monorepo project designed with Google Translate JS SDK. Vue and react are supported!
https://google-translate-select.i7eo.com
MIT License
370 stars 86 forks source link

🐛 Bug - type error in nextjs 14.2.4 #109

Open DarknessMonarch opened 2 months ago

DarknessMonarch commented 2 months ago

@google-translate-select bug report

Summary

this is the type error am getting when i run it on nextjs

Screenshot 2024-08-19 042512

TypeError: (0 , _index3_mjs__WEBPACK_IMPORTED_MODULE_3__.jsx) is not a function

Environment

Next.js 14.2.4

I tested using both chrome and brave but it safe to assume that the problem is simply next.js

Steps to reproduce

  1. install on nextjs
npm install npm install @google-translate-select/react
  1. import and use it
"use client"

import GoogleTranslateSelect from "@google-translate-select/react";

export default test = () => {
return (
  <div>
          <GoogleTranslateSelect
            defaultLanguageCode="en"
            defaultPageLanguageCode="en"
            fetchBrowserLanguage={false}
            trigger="click"
            select={handleGoogleTranslateSelect}
          />
        </div>
);
}
  1. Run it
npm run dev

Expected results

to work like how it works on the projects i have used on vue

Actual results

Screenshot 2024-08-19 042512

i7eo commented 1 month ago

Marking issue as stale since there was no activity for 30 days