scss rendering error [Internal Error: File to read not found or unreadable:]

安稳与你 提交于 2020-06-26 12:41:08

问题


I want to make a website with scss but when i save the scss file it gives me an error. However, if I saved it a couple times then it will render completely. Its nothing major but it bugs me.

I tried finding an answer in Google but nothing works

This is just a simple scss file because I am just trying to check if there's an error before i begin my project. turns out there is.

@import "fixed";

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #444;
}

{
  "status": 3,
  "message": "File to read not found or unreadable: E:/Coding Stuff/Websites/bs4/scss/main.scss",
  "formatted": "Internal Error: File to read not found or unreadable: E:/Coding Stuff/Websites/bs4/scss/main.scss\n"
}

after saving a few times then:

=> changed: E:\Coding Stuff\Websites\bs4\scss\main.scss
Rendering Complete, saving .css file...
Wrote CSS to E:\Coding Stuff\Websites\bs4\css\main.css

What did i do wrong? please help


回答1:


if you are using a node-sass as the compiler and vscode or sublime text AFAIK, the issue is with atomic save option where node-sass can't have access to transpile the scss file because the editor is still busy with it. Two ways of fixing this include:

  1. Replace render.js file of node-sass

check here there is a drawback of having to do this everytime you install node-sass

  1. Install sass module instead

    $ yarn add -D sass script

    $ sass --watch input.scss output.css



来源:https://stackoverflow.com/questions/57705352/scss-rendering-error-internal-error-file-to-read-not-found-or-unreadable

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!