viclafouch / mui-tel-input

📌 A phone number input designed for MUI (Material ui) V6 built with libphonenumber-js
https://viclafouch.github.io/mui-tel-input
MIT License
158 stars 65 forks source link

Cannot import the library #122

Closed pecataToshev closed 7 months ago

pecataToshev commented 7 months ago

The library cannot be imported in projects with node > 18.

This is the error I get on node 20.6.1 when I try to run the project with this library

/node_modules/mui-tel-input/dist/mui-tel-input.es.js:1
import { jsx as N, jsxs as H, Fragment as Fe } from "react/jsx-runtime";
^^^^^^

SyntaxError: Cannot use import statement outside a module
pecataToshev commented 7 months ago

Duplicate of https://github.com/viclafouch/mui-tel-input/issues/84