-
Notifications
You must be signed in to change notification settings - Fork 47
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
Module parse failed #85
Comments
Same issue |
Can you give me some more details on your setup? Are you using "vanilla" EDIT: For example, check out this working basic codesandbox example: https://codesandbox.io/s/basic-timezone-react-example-3dro2p |
Same issue
Vanilla react 18.2.0 |
Hey there's a lot of updates related to bundling / published version. Can you give the |
I get the same error with latest installed, using Nextjs though. Update: Fixed by adding: |
Looks like theres still an issue with using |
Published a new version with some changes, including making i.e. npm install react-select [email protected] |
Is the error in this sandbox related to this one? It's an error in the dev server (react-scripts - when using v1.54+) https://codesandbox.io/s/wonderful-franklin-15xbjq?file=/src/App.tsx |
I believe this is something else based on one of the recent PRs, should be fixed in |
Still seeing this with 2.1.0 when importing the TimezoneSelect component. The useTimezoneSelect hook import works fine though! |
I'm guessing it's because the TSC target for the library is https://github.com/ndom91/react-timezone-select/blob/main/tsconfig.json#L5 The solution in userland is probably to configure your bundler/builder to transpile the library (see NextJS For the library author, maybe bump that target down to ES6 or at least something safer: https://www.typescriptlang.org/tsconfig#target |
Yeah worth trying.. I've updated the |
Let me know if that helped in any way 🙏 |
Does anyone still see this issue with |
Yes I'm still experiencing this issue when running with nextjs. Seems though that its coming from the react-select dependency that is used by react-timezone-select if that helps. What's interesting is that in the actual code in my application, this is happening when i'm importing the useTimezoneSelect hook import { useTimezoneSelect } from 'react-timezone-select' "next": "^13.2.3" `error - ./node_modules/react-select/node_modules/@babel/runtime/helpers/esm/classCallCheck.js
Import trace for requested module: |
@danny-nguyen-lab49 can you give |
Haven't heard back here, should be working now so I'm going to close this. If anyone still has an issue, feel free to open a new issue |
Describe the bug
Uncaught Error: Module parse failed: Unexpected token (9057:38)
File was processed with these loaders:
You may need an additional loader to handle the result of these loaders.
Reproduction
importing the module is enough.
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: