egoist / egoist/rollup-plugin-postcss
Error: File to import not found or unreadable
- Dominant language
- JavaScript
- Stars
- 689
- Forks
- 210
- PR merge metrics
- No merged PRs in 30d
Description
Hi there,
Experiencing and intermittent issue wherein I cannot import a file directly after I save it with watch enabled. The error appears as follows.
```
[!] (plugin postcss) Error: File to import not found or unreadable: components/carousel.scss.
src\scss\stylesheet.scss
Error: File to import not found or unreadable: components/carousel.scss.
at options.error (...\node_modules\node-sass\lib\index.js:291:26)
```
However I can seem to trick this by saving the file a few times, or elsewise moving to the main `stylesheet.scss` file and saving it with no changes. File structure and configuration is like the following (omitted `reset.scss`).

```scss
// stylesheet.scss
@import "components.scss";
```
```scss
// components.scss
@import "components/nav.scss";
@import "components/carousel.scss";
```
```js
// rollup.config.js
const path = require("path");
import postcss from "rollup-plugin-postcss";
export default {
input: "src/main.js",
output: {
file: "dist/bundle.js",
format: "cjs",
plugins: [],
},
watch: {
exclude: ["node_modules/**"],
},
plugins: [
postcss({
plugins: [],
extract: true,
}),
],
};
```
Am I clearly missing something in regards to file permissions or the like? Didn't see much difference running VSCode/Powershell as an administrator.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.