-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
fix: issues using NextJS
#1471
Comments
Hi @krichdev, I see that you are using Next, currently, our components are having issues with SSR. |
some problems can be solved using this config
|
With [email protected] the above mentioned config didn't work for me. Next has built-in CSS & Sass support. I managed make it work with slight modifications:
|
Hello, After applying what gabeszrozsa said, I still have an Error which is coming from the FileSelector component (from ./components/FileSelector/icon.js). (next.js 9.5.5) FileList (which is provided by browser and that is not available server side) is undefined when compiling. So when you check in that file, at the end in the propTypes definition, you see : To allow next.js to compile things correctly, this is better :
Thanks a lot. Edit : I could create the PR if needed. Another (less good) solution would be to import https://github.com/node-file-api/FileList somewhere through the webpack config when trying to use react-rainbow with nextJS. But it implies that it should be done in each project. |
Hi, I got the same problem, I am using @gabeszrozsa code fix with @nomocas changes.
I get this message The second I remove the <Appacation part it does all work properly (with the fixes from above). Are there any plans on fixing that problem because it is really sad to not be able to use this awsome package with next.js |
We are working on moving fonts to a CDN which will solve some problems with the SSR. @maximegheraille the issue with the navigator is specific to the Application component, which uses the navigator browser API, also there are other components that use specific browser APIs that have the same issue. Thanks for using react-rainbow. |
@maximegheraille we have released version 1.24.0 where we fix issues with the Application and the FileSelector with SSR, you can try it now |
@LeandroTorresSicilia just tried it out and it works. Thanks a lot for the quick fix |
Just installed the last version (1.24.0) on my NextJS project and not working. |
@arthurpietruch the only thing I have configured is this inside my next.config.js
|
@arthurpietruch this is the config we have in our rainbow-next-experience repo:
also if you are using styled-components, it is recoomended to add
this have been tested on this environment |
In the new version 1.24.1, we have moved the fonts to a CDN, now react-rainbow-components works out of the box with Next.js, I have updated the next experience example project (https://github.com/nexxtway/rainbow-next-experience) We wait for your feedback. |
@LeandroTorresSicilia Hi, I tested it with no config at all and i'm getting this in the console.
|
@maximegheraille after install my package.json
|
@wildergd I did not work for my project,
The console message was still there, while making a new project works fine (tested it) |
@maximegheraille this is weird .. as far i can see.. in the css code you posted it is still using a version of the library that has embed fonts, the |
@wildergd I tried this and the message is still there, while using version
Because this project is almost empty, I think I am just going to remake it instead |
@maximegheraille imcan you share your project code? In order to check? |
@wildergd I just added you to my repo |
Ok i'll check |
@maximegheraille ok.. i cloned your repo, removed package-lock.json, then i ran
|
@wildergd do you stil get the console message ? Like I showed above ? |
@maximegheraille no... i didn't get the same messages... see the log i got from my env is: anyway... sometimes i also clear |
@wildergd I meant when using I tried you solution and still getting the error inside the chrome dev tools. my env: |
@maximegheraille Yes... now i see the problem... is like if next was escaping css... it shows a warning but load the css.... |
|
@wildergd any movement on this, it seems it has been solved, but have the latest version of react-rainbow still not working. |
@nyousefzai They haven't released a new version since Jan 22, so I guess we have to wait until they release it |
@maximegheraille @nyousefzai |
Just commenting here to let anyone know that if you use NextJS + Vercel and your Vercel deployments hang for infinite amount of time, it's because of this library. Importing the Calendar component caused my Vercel deployments to hang for 45 minutes before they eventually timed out, with no error messages. This is a great looking component library but its a shame that the maintainers cannot figure out SSR. I ended up using |
I am very sorry to hear that, we try to maintain the library in our free time, and many times users find issues that we have not had before. This is an open-source library and you are free to contribute by fixing any problems if you wish. |
Yep exactly same thing for us. A lot of time was lost to find the cause of nextjs 12 hang. We're searching for an alternative calendar. The problem is not provided by nextjs build logs. Hard to say what is the problem with rainbow components. |
This bug is still there, I have created an issue for vercel/next.js#37573 for NextJs team. |
if you are still struggling with the long build time, the page that imports the components
calendar.ts
|
@shlomo20 this worked :) thanks a lot 👍 |
Receiving an error about the Lato-Black font in the Application component.
Describe the bug
Add library to project and tried using the ProgressIndicator and ProgressStep components. Would get the error below in console and browser.
Screenshots
Console error
To Reproduce 🕹
Steps to reproduce the behavior:
Expected Behavior 🤔
Ability to render the components without error.
Current Behavior 😯
Page will not load and displays the error about the font
Context 🔦
Just simply trying to add two components to a page
Your Environment 🌎
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: