SCSS compile error in Visual Studio Express 2013 Web Essentials - visual-studio-2013

I am trying to get Sass to work in Visual Studio Express 2013 for Web using Web Essentials. When I include the most basic scss file, I get a compilation error. Here is my sample file:
$font-stack: Helvetica, sans-serif;
$primary-color: #333;
body {
font: 100% $font-stack;
color: $primary-color;
}
The error I am getting is:
Compilation Error occurred (see error list to navigate to the error location):
Error found:
However, the error in the Error List of Visual Studio is blank and only says Line 1 Column 1 with no further information. It also does not matter what I have in the scss file, get the same error even with only the body tag with open and close brackets.
The VS version is: 12.0.30501.00 with Web Essentials 2.2
Any help would be really appreciated. Thanks!

Sass + Web Essentials doesnt allow to rename the files, they begin to throw compile errors. Please check you didn`t rename it. Or you can copy content of the file, drop it and create new one with old content. Everything will be ok.
Other reason may be your files after check-in source code are in read-only state and Saas compiler cant chekout it automaticly, so you need uncheck readonly flag from folder with *.scss - or just check-out for edit them from TFS.
Today I found another reason - sass cache. It can be removed from here - C:\Users\%Username%\AppData\Local\Temp\

In my case, this was due to an included .scss file itself attempting to include another .scss file that was too deep in the directory hierarchy for node-sass to deal with. I isolated which file was causing the problem by debugging Web Essentials and hijacking the call to node-sass to see the real error output which was:
D:\Path\Assets\Areas\Area\/Section/section.scss:1: error: file to import not found or unreadable: '../../../Shared/Mixins/buttons.scss'
Prepending ./ to the path to the second included file fixed the problem in my case, as per this issue that I eventually stumbled upon. e.g.:
#include './../../../Shared/Mixins/buttons.scss';

Related

Laravel Mix is skipping some CSS files and not outputting everything

I see Laravel is getting rid of Elixir with v8.0, so I'm working through changing all of our apps over to Mix.
I am able to successfully mix my js files into all.js, and the scss files are produced and mixed into the final all.css file. My problem is that it simply will not load some of the css files within the style method. npm run is successful - it outputs all files without error. It just doesn't include some of the css files.
I have tried:
Moving the js mix above css. -- no change
Changing the name of the offending css files -- no change
Reducing the offending css files down to almost nothing, just a few lines -- no change
Copy/paste of the offending css files into a single file -- WORKS
But this is a non-solution; if I change the base files, I would have to copy paste each time.
Also seems to indicate that the problem is not with the css???
Elixir handled this perfectly and did all I need to. What am i missing with Mix??
Webpack.js (trimmed):
mix.scripts(['public/js/sweetalert1.js', 'public/js/base.js', 'public/js/jquery.tablesorter.js',
'public/js/jquery.validate.js'], 'public/output/all.js')
.options({
processCssUrls: false
}).version(); // Success
mix.sass('resources/assets/sass/tablesorterColumns.scss', 'public/css/mixed'); // Success
mix.styles([ 'public/css/mixed/base.css', 'public/jquery.tablesorter.css',
'public/css/swal1.css', 'public/css/bootstrap-dropdown-menu.css'], 'public/output/all.css').version();
// Fails reading two files, but Success on output of the others
Everything works except it simply doesn't touch the two files, bootstrap-dropdown-menu.css and swal1.css

Having problems building github page(SCSS import fails (Jekyll))

I was trying to run a github page with Jekyll theme,and the website runs fine locally. However, when I try to urn in on htttps://username.github.io, GitHub cannot build the website.
I got the following error message :
Your site is having problems building: Your SCSS file myblog/assets/main.scss has an error on line 1: File to import not found or unreadable: minimaless.
The main.scss :
---
# Only the main Sass file needs front matter (the dashes are enough)
---
#import "minimaless";
It seems to be the path to the .scss file expected by GitHub is different from where the Jekyll theme put it. I checked some posts mentioned that I should put the absolute path of .scss in _config.yml file.
It seems to be the path to the .scss file expected by GitHub is different from where the Jekyll theme put it. I checked some posts link mentioned that I should put the absolute path of .scss in the directory of urlbase, which is /myblog. But I am not familiar with ruby, so I am not sure how should I do it.
The folder structure is like this :
myblog/
- assets/
- main.scss
- _sasss/
- minimaless.scss
- minimaless/
- basic.scss
- layout.scss
- hight-lighting.scss
- _config.yml
This is my GitHub page folder :
https://github.com/Po-Hsuan-Huang/Po-Hsuan-Huang-github.io
The issue could be because your source contents are within a subdirectory myblog. Try moving all the contents to the root of your repository.
It could also be because of the following in your config file:
theme: minimaless
#remote_theme: brettinternet/minimaless
theme: minimaless is not supported on GitHub Pages. Comment it out.
And finally, _site directory should not be checked into version control. Delete it from your repository and then add an entry for it in your .gitignore file.

Resolving asset location issue using Ruby SCSS transpiler in WebStorm

I have this structure of SCSS:
app
styles.scss
bower_components
_colors.scss
_fonts.scss
sass
index.scss
styles.scss:
#import "sass/index";
index.scss:
#import "bower_components/_colors";
#import "bower_components/_fonts";
app folder is set as working directory in File Watcher settings and is marked as "Resource Root" in WebStorm. However, transpiling fails with error:
error sass/index.scss (Line 3: File to import not found or unreadable: bower_components/_colors.)
I've read that #imports evaluated in SCSS
relative to current file location
relative to root location
But in my case it is obvious that Ruby transpiler doesn't do attempt to find files relative to root location. Is it a bug? Or I am doing something wrong?
I installed SCSS through Ruby and set up File Watcher according to https://www.jetbrains.com/help/webstorm/2016.1/transpiling-sass-less-and-scss-to-css.html
This is my File Watcher settings:
You will get exactly the same issue when running scss.bat in command line:
C:\Projects\prj>cd app
C:\Projects\prj\app>C:/Ruby193/bin/scss.bat --no-cache --update sass/index.scss
error sass/index.scss (Line 1: File to import not found or unreadable: bower_components/_colors.)
See https://github.com/sass/sass/issues/652: current working directory being automatically placed on the Sass load path is deprecated in 3.3. You need passing the load path explicitly with -I option to work with folders relative to the working directory. Like:

I keep getting errors in my Gulp SASS setup due to the import stylesheet

Hi everybody I'm new to learning Gulp and I can't seem to get over this hurdle. I am trying to compile my sass and I will set it to gulp-watch. It will work fine for a little while, but then it will show an error- the file is not found or unreadable.It looks something like:
events.js:154
throw er;// Unhandled 'error' event
Error: app/scss/main.sass
Error: File to import not found or unreadable: layout1
Parent style sheet: stdin on line 2 of stdin
I have tried to look on this site for the solution to my problem and I thought putting the includePaths would work (maybe I'm doing it wrong) but I'm still getting errors. Could someone please help me out?Here are some images of my project. Here is a link to some pictures: http://imgur.com/a/pQBHV
Looks like there are a few issues:
1) You should probably use the scss extension with all your files and update the sass task in your gulp file to watch for changes like so: gulp.src('app/scss/*.scss') or since, in theory, all files contained in that folder should be sass, you could do this instead: gulp.src('app/scss/*') which will watch all the files in the directory.
2) There's also an issue with the names of your sass files. You need to prepend the files you wish to import with an underscore so the compiler knows these files are partials.
So your sass files should look like:
_layout1.scss
main.scss
_normalize.scss
_styles.scss
And import the partials in main.scss:
#import 'normalize';
#import 'layout1';
#import 'styles';
More info http://sass-lang.com/guide#topic-4

Magento 1.9 Installation Error

I am trying to install magento 1.9 on my web hosting server .
I ftp-ed the files into my hosted website but experience the following error when i try to access my URL.
Fatal error: Class 'Mage_Core_Controller_Request_Http' not found in /home/bf/public_html/app/code/core/Mage/Core/Model/App.php on line 1238
I tried a google search but i am unable to find anything relevant .
Just download the Fresh copy from Magento community again. Also make sure that your server has all the prerequisite for Magento as mentioned in below link.
http://docs.magento.com/m1/ce/user_guide/magento/system-requirements.html
Please make sure that below files exist in this directory
app/code/core/Mage/Core/Controller/Request/Http.php
1.Make sure you have enabled curl on your server and with have right file permission.
2.Make sure file should exist on following path:
/home/bf/public_html/app/code/core/Mage/Core/Controller/Request/Http.php
3.Make sure compilation mode is disabled.
/home/bf/public_html/includes/config.php
Every thing inside should be commented.
4.If it does not work, you have to debug this.
Open index.php in root and add these line of code,
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
It will show you why error is coming.Once you will find the root cause, you can get the solution on google or any forum.

Resources