Not working with Next.js
See original GitHub issueDescribe the bug
error - ./node_modules/react-js-cron/dist/esm/styles.css
Error: ENOENT: no such file or directory, open '/Users/tmorrow/repo/iot/node_modules/react-js-cron/dist/esm/styles.css'
To Reproduce Try to use this library in a nextjs project
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
javascript - Tailwindcss not working with next.js; what is wrong ...
In my case, I had set up the Tailwind config file correctly, but tailwind styles were not applying. Deleting the .next folder and...
Read more >TailwindCSS not working in NX NextJS project. #8355 - GitHub
Current Behavior Following the egghead tutorial for a NextJS project with a new nx-workspace, installing Tailwind is not working.
Read more >Debugging Tailwind CSS and Next.js - LogRocket Blog
Using Tailwind CSS and Next.js together can be a powerful match, sometimes a few bugs get in the way. Learn to fix them...
Read more >module-not-found - Next.js
The module you're trying to import uses Node.js specific modules, for example dns , outside of getStaticProps / getStaticPaths / getServerSideProps. Possible ...
Read more >next.config.js: Introduction
Avoid using new JavaScript features not available in your target Node.js version. next.config.js will not be parsed by Webpack, Babel or TypeScript.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello,
Did it! 🥳
I removed the internal import of a CSS file inside the component. You should now be able to use this package without any problem with Next.js.
Please let me know if there are any other issues.
You can install the version 2.0.0 and don’t forget to import manually the styles file, as mentioned in the README
Repo is here: https://github.com/lacymorrow/next-cron
Run
yarn
andyarn dev
and visit http://localhost:3000 to reproduce the issue, error is in the terminalI just used
yarn create next-app --typescript
to generate a NextJS project, thenyarn add react-js-cron antd
to add dependencies, then added the<Cron>
component to the index.tsx page.The error is as follows:
Latest versions of
react-js-cron
,antd
, andnext