question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't resolve './cradleLoader.css'

See original GitHub issue

Getting this error when I installed the latest version and imported the react-spinner-loader.css file. My app was just made using create-react-app and has no other custom stuff

I did notice this was a very recent change to change the filenames from CradleLoader.css to cradleLoader.css without changing the imports. Was there a reason for that change? It is possible, since I’m using a Mac, that the change throws an error for me, while for someone using a Windows device, the issue won’t show

Failed to compile.

./node_modules/react-loader-spinner/dist/loader/css/react-spinner-loader.css (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-4-1!./node_modules/postcss-loader/src??postcss!./node_modules/react-loader-spinner/dist/loader/css/react-spinner-loader.css)
Cannot find file: 'cradleLoader.css' does not match the corresponding name on disk: './node_modules/react-loader-spinner/dist/loader/css/CradleLoader.css'.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
shivang-9357commented, Feb 10, 2022

FIXED 100% !!! The problem is in

…/node_modules/react-loader-spinner/dist/loader/css/react-spinner-loader.css

Here the imports are misspelled. Just change it from:

@import"./cradleLoader.css";
@import"./plane.css";
@import"./triangle.css";

to

@import"./CradleLoader.css";
@import"./Plane.css";
@import"./Triangle.css";

Just make the names the same as the file names in the same folder.

3reactions
mhnpdcommented, Feb 6, 2022

Looks like there is still an issue and I have a proposal to remove css entirely for the library.

Having the css files in the project is already causing a lot of issue in multiple environment and I am think of removing it from project and using css-in-js library to maintain the css. This will allow us support SVG as well as CSS base loader without having css files and ready to use exports.

Read more comments on GitHub >

github_iconTop Results From Across the Web

css - How to resolve this problem ? it s with webpack or not?
but somwhere in your code you import that file ./node_modules/react-loader-spinner/dist/loader/css/CradleLoader.css and it is not inside path.
Read more >
mhnpd/react-loader-spinner - CSS not in the dist folder - GitHub
Hi,. Thanks for your work very nice and easy to use. When I try to use the Loader I received this error message:...
Read more >
css-loader | webpack - JS.ORG
The css-loader interprets @import and url() like import/require() and will resolve them. Getting Started. Warning. To use css-loader, webpack@5 is required. To ...
Read more >
Module not found: Can't resolve 'sass-loader' | bobbyhadz
To solve the error "Module not found: Error: Can't resolve 'sass-loader'", make sure to install the package by opening your terminal in your...
Read more >
resolve-url-loader - npm
Resolve URL Loader. NPM. This webpack loader allows you to have a distributed set SCSS files and assets co-located with those SCSS files....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found