-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
🐞 Importing useIdleTimer throws error during compilation with "type": "module" #362
Comments
What are you using to build your project? Can you post your full package.json? |
Sure, here is our package.json
|
Error occurs during compilation, upon adding "type": "module" in package.json Not able to use IdleTimer at all due to this, as its import throws error. |
This might be because of remix not supporting the import { useIdleTimer } from 'react-idle-timer/dist/index.esm.js' |
This can be fixed by adding |
@Haraldson, Yes, I had also resolved it by adding it to serverDependenciesToBundle in remix.config.js. @SupremeTechnopriest, It'd be very helpful if the issue is fixed in the package itself. |
I slated some time at the beginning of Q2 to address open issues 👍 |
👋 @SupremeTechnopriest - We we navigating through PRs and found that #352 fixes this issue. Could you please take a look at it and see if we can be merged? 🙏 appreciate your work! 🙏 |
@csantos1113 Sure I will review it after work today. |
What happened?
Importing useIdleTimer throws error during compilation with "type": "module" in package.json
import { useIdleTimer } from 'react-idle-timer';
Sample package.json
Error during compilation
Relevant log output
No response
Screenshots or Additional Context
No response
Module Version
5.7.2
What browsers are you seeing the problem on? Select all that apply.
No response
What devices are you seeing the problem on?
No response
Verification
The text was updated successfully, but these errors were encountered: