-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Refused to apply style from 'https://unpkg.com/react-select@2.0.0-alpha.8/dist/react-select.css' #2452
Comments
I'll throw a +1 in; I went to use this package and found that Related issues?: #1592 |
I tried all alpha version and none work, I have no idea how unpckg works and who has access to those files, neither why they got deleted, but the fastest workaround I can think of is to use another CDN. If someone has a version of the CSS file available somewhere it'd would be nice, I just looked into the react-select repo and couldn't find the dist folder for the alpha versions either. I guess we need to recompile it and put it on another CDN (or fix the existing one) Either way, I'll move it to my own CDN, this just can't happen in production, it's way too sensitive. I wonder how many people have been affected. |
I have this issue too 😭 |
as a workaround you can just pull the file directly from the repo and host it yourself for now - https://raw.githubusercontent.com/JedWatson/react-select/v1.2.1/dist/react-select.min.css |
Beware the version though, the link given by @crimclark is for 1.2.1, not 2.0.0-alpha.8 |
If you have installed this via a package manager you can get the file from your dist folder locally :) |
It's not that simple @lgoudriaan. I just checked and I installed the react-select@1.2.1 as node package, but unpkg redirects me to a broken 2.0.0-alpha8 for the css with the link given in the official documentation, I don't know why really. I'm gonna give it a try with the 1.2.1 and see how it goes. |
I tried with the https://raw.githubusercontent.com/JedWatson/react-select/v1.2.1/dist/react-select.min.css but it didn't work, I got the file, but the MIME was wrong and style was broken as well. If you need a quick fix for 1.2.1, here is my own CDN link: Note that I don't know how much time it'll stay there, probably a few weeks/months at least, use it if you need a quick fix, but better switch over a more official/stable link once this issue is resolved. I have no idea why my app tried to load the 2.0.0-alpha8 version, and I don't know if I was using the 1.2.1 or the 2.0.0-alpha 8 prior to the bug (because the link https://unpkg.com/react-select/dist/react-select.css seems to redirect to a dynamic page), but it works with 1.2.1 as it did before. |
We may import CSS from library itself. import 'react-select/dist/react-select.css'; Worked for me. |
Same here, there is no css file in the dist directory |
@tvsudhir3 where did you used this import?
|
@jgcmarins You didn't configure your webpack with a plugin that loads CSS files, that's why.
I can't guide you through this, though. |
@jgcmarins Webpack config (in this context, if it helps): module: {
rules: [
...
{
test: /\.css\/,
use: [{ loader: 'style-loader'}, { loader: 'css-loader' }],
}
...
],
},
resolve: {
...
extensions: ['.css']
...
} |
solved this adding |
Still no official fix? 😢 |
Having the same issue (already resolved a temporary fix). |
@JedWatson Ping, did you notice this issue? |
I'm trying to sort this out now |
So it looks like there was an issue with the tag in the latest release. I swear I added the I've set IMPORTANT INFORMATION When v2.0 final is released (out of alpha/beta) it will become the Before that happens, please make sure you replace any unversioned references to react-select on unpkg with the version that matches what you actually have installed. For example:
absolutely must be replaced with
|
@JedWatson Better change the doc so that new users take the 1.2.1 version from now on, nobody wants to do a major upgrade without being notified first. ;) |
It works for me..Thanks @JedWatson .. |
Something has changed on https://unpkg.com/react-select@2.0.0-alpha.8/dist/react-select.css whihc is the official CSS way of rendering react-select. Basically, they deleted the file, or made some change that makes it unavailable right now.
All applications based on react-select, which are using this css file from https://unpkg.com/ are failing right now.
This happened like 30mn ago.
Official workaround:
https://unpkg.com/react-select@1.2.1/dist/react-select.css
instead of dynamic onehttps://unpkg.com/react-select/dist/react-select.css
(very important to do so, since V2 will be released soon and anyone use the dynamic version will get the v2 instead of v1.2.1)Workarounds while waiting for an official solution from react-select authors/contributors:
Use my personal CDN: https://storage.googleapis.com/studylink-loan-advisor/react-select-v1.2.1.min.css (temporary solution, don't rely on this for long-term solution, only use this if you are in a hurry) see Refused to apply style from 'https://unpkg.com/react-select@2.0.0-alpha.8/dist/react-select.css' #2452 (comment)import 'react-select/dist/react-select.css';
(or alike, using bower, etc.)The text was updated successfully, but these errors were encountered: