Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

File to import not found or unreadable #3302

Open
b5414 opened this issue Sep 27, 2022 · 0 comments
Open

File to import not found or unreadable #3302

b5414 opened this issue Sep 27, 2022 · 0 comments

Comments

@b5414
Copy link

b5414 commented Sep 27, 2022

  • NPM version (npm -v): 8.13.1
  • Node version (node -v): v16.15.1
  • Node Process (node -p process.versions):
  • Node Platform (node -p process.platform): win32
  • Node architecture (node -p process.arch): x64
  • node-sass version (node -p "require('node-sass').info"): node-sass 7.0.3 (Wrapper) [JavaScript] & libsass 3.5.5 (Sass Compiler) [C/C++]
  • npm node-sass versions (npm ls node-sass): node-sass@7.0.3 & ReactScripts > sass loader > node-sass@7.0.3 (deduped)

The Issue:

Time to time I get a banner with an import error, absolute random, not sure what is it

The Error:

Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: File to import not found or unreadable: F:\github\FOLDER\src\assets\styles\colors.scss.
        on line 175 of src/components/Container/Container.module.scss
>> 		@import '../../assets/styles/colors.scss';

The Code:

// Container.module.scss

.wrapper {
	&:has(h1) {
		// line 175:
		@import '../../assets/styles/colors.scss';

		> h1 {}
	}
}

// src\components\Container\Container.module.scss


// colors.scss

.red {
	color: var(--_red);
	background-color: var(--red_light);
}

// src\assets\styles\colors.scss

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant