phpsass icon indicating copy to clipboard operation
phpsass copied to clipboard

SassContextException not found

Open sreerajpjayaraj opened this issue 9 years ago • 2 comments

I was trying to use this lib in Drupal. After adding phphsass in the drupal library I got the following fatal error.

Fatal error: Class 'SassContextException' not found in C:\xampp\htdocs\drupal-7.51\sites\all\libraries\phpsass\tree\SassContext.php on line 102

The class SassContextException is not defined in the library. Is there any other dependencies for phphsass ?

sreerajpjayaraj avatar Nov 17 '16 15:11 sreerajpjayaraj

This type of a support question should go on drupal.org because it's not phpsass specific, phpsass does not need Drupal, however sassy needs prepro, Drupal and the phpsass library

https://www.drupal.org/project/sassy

Installation Process

This module has 3 requirements to work: Prepro (http://www.drupal.org/project/prepro), Libraries (http://www.drupal.org/project/libraries) and PHPSass (http://github.com/richthegeek/phpsass).

Place Sassy, Prepro, and Libraries in your modules directory (sites/all/modules) and PHPSass(NOTE: rename phpsass-master to simply phpsass) in your libraries directory (sites/all/libraries, create it if it doesn't exist). Enable Sassy and any SASS/SCSS files served by your site should be compiled!

joejoseph00 avatar Nov 18 '16 04:11 joejoseph00

Thanks for the reply @joejoseph00

I have already installed Prepro, Libraries and sassy. Also this library PHPSass was used included. The PHPSass lib is renamed as phpsass. But error is thrown from the phphsass library.

If you check the error which I posted earlier your can see that it says "Class SassContextException not found". It says that no such class defined in the library, but exception is thrown from the class SassContext "tree/SassContext.php".

I can see that the class is defined in the file tree/SassNodeExceptions.php SassContextException is a class which inherits from SassNodeException.

Coming back to the file tree\SassContext.php , The above mentioned classes are not included in the file. Is this causing the issue?

Thanks & regards Sreeraj P.

sreerajpjayaraj avatar Nov 21 '16 09:11 sreerajpjayaraj