foundation-emails icon indicating copy to clipboard operation
foundation-emails copied to clipboard

Fresh installation, SASS error on file save

Open grzegorzgit opened this issue 5 years ago • 2 comments

Saving any scss file except of app.scss generates error.

How can we reproduce this bug?

  • Install new project: foundation new --framework emails
  • run npm start
  • go to src/assets/src/templates/_template.scss
  • change anything, eg. body background color to #000000
  • safe the file

It refreshes the browser, but it doesn't compile the .css files, giving this output:

 
[10:20:16] Starting 'resetPages'...        
[10:20:16] Finished 'resetPages' after 3 ms
[10:20:16] Starting 'sass'...
Error in plugin 'sass'
Message:
    src\assets\scss\app.scss
Error: File to import not found or unreadable: template/template.
        on line 4 of src/assets/scss/app.scss
>> @import 'template/template';
   ^

[10:20:16] Finished 'sass' after 22 ms
[10:20:16] Starting 'pages'...
[10:20:16] Finished 'pages' after 136 ms
[10:20:16] Starting 'inline'...
[10:20:17] Finished 'inline' after 134 ms
[10:20:17] Starting '<anonymous>'...
[Browsersync] Reloading Browsers...
 

This doesn't happen when I safe "app.scss" file, then SASS compiles the .css and refreshes the browser (with the same "unreadable" _theme.scss).

What did you expect to happen?

I expected the framework to work (compile the assets) or to provide a message what is the problem.

grzegorzgit avatar Nov 20 '20 09:11 grzegorzgit

You probably use a wrong path for template/template. Shouldn't it be templates/template with an s?

DanielRuf avatar Nov 23 '20 10:11 DanielRuf

No, the paths are ok. The problem comes with Visual Stuio Code, when I edit the .scss file in Windows Notepad, then it compiles correctly. But it is strange, because I use Visual Stuio with webpack, and there is no problem, first time I saw it with Foundation.

grzegorzgit avatar Nov 26 '20 12:11 grzegorzgit