How to use SCSS with Express ? (Node.js)

Is there any way to use SCSS with Express ?

I tried with :

app.use(express.compiler({ src: __dirname + '/public', enable: ['scss'] }));

But it gives me an error :

DEBUG: TypeError: Cannot read property 'match' of undefined

Thanks

-------------Problems Reply------------

There is no way you can use it that way i.e. as a built in module. The author of ExpressJS himself said that it is not possible. I was having the same problem and found out that you either had to use SASS.js or LESS.
Refer this: https://github.com/visionmedia/express/issues/787
I recommend you to use Stylus!

Take a look @ Node-sass -- NPM Package | Github

This is a wrapper around the C/C++ library libsass.

Category:node.js Views:0 Time:2011-10-08

Related post

  • The LINQ expression node type 'Invoke' is not supported in LINQ to Entities 2011-02-28

    public CategoryViewModel GetSingle( Expression<Func<CategoryViewModel, bool>> where) { Expression<Func<DAL.EntityModels.Category, CategoryViewModel>> converter = c => ToBll(c); var param = Expression.Parameter(typeof(DAL.En

  • how to get POST query in express node.js? 2011-04-19

    Here is my simple form: <form id="loginformA" action="userlogin" method="post"> <div> <label for="email">Email: </label> <input type="text" id="email" name="email"></input> </div> <input type="submit" valu

  • Unrecognized expression node: ListInit when using linq 2011-08-10

    I'm getting an error for the below query. Unrecognized expression node: ListInit' Everything looks fine to me and complies. Let me know if you need details of the datacontext or any of the classes. Any ideas? rsp = (from r in db.btRequests join o in

  • How to allow CORS in Express/Node.js? 2011-08-15

    I am trying to support CORS in my Node.js application that uses the Express.js web framework. I have read a Google group discussion about how to handle this, and read a few articles about how CORS works. First, I did this (code is written in CoffeeSc

  • The LINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities 2011-12-02

    public List<string> GetpathsById(List<long> id) { long[] aa = id.ToArray(); long x; List<string> paths = new List<string>(); for (int i = 0; i < id.Count; i++) { x = id[i]; Presentation press = context.Presentations.Where(m

  • How to programmatically send a 404 response with Express/Node? 2011-12-05

    I want to simulate a 404 error on my Express/Node server. How can I do that? --------------Solutions------------- Nowadays there's a dedicated status function for this on the response object. Just chain it in somewhere before you call send. res.statu

  • The LINQ expression node type 'Invoke' is not supported in LINQ to Entities in entity framework 2012-01-05

    can anyone help me out in solving my issue. I am using the code given below: public IEnumerable<InvoiceHeader> Getdata(Expression<Func<InvoiceHeader, bool>> predicate) { return AccountsContext.InvoiceHeaders.Include("Company").Inclu

  • How to access req/res outside of route handler in express/node 2012-04-18

    Very simply, I'm mapping a route in my express/node app to a method in another module. On completion, an event is dispatched. All works great, but how do I get at res in my 'on_products' event handler? Here is the general idea: Routes = (app) -> e

  • How would I create a .js file that contains all of my .html templates in Express & Node.js? 2011-03-22

    I am using jquery templates on both the server-side and client-side. I'm using the jqtpl and express modules on Node.js for the server, and I have jquery and its template plugin for the client. Wherever possible the client recieves JSON instead of ht

  • Using Mysql with Nodejs and Express (node-mysql) 2011-05-04

    Im new to node and express and I have a question regarding using mysql. I have a login form that posts to '/login'. Im using the node-mysql module. app.get('/site', function(req, res){ if (req.session.is_logged_in === true) { res.render('site/start',

  • JADE: express/node variables/objects in jade inline javascript? 2011-06-03

    i use inline javascript in my jade templates for generating a google map. my problem is: how can i pass variables/objects from the node/express controller into this inline javascript snippet? any ideas? thanks --------------Solutions------------- app

  • How can I send some HTML, render a view, then send more HTML in Express+Node.js? 2011-06-29

    I'm using Node.js+Express, and I've come across a case where I need to send some HTML, render a view, then send some more HTML in the one response. The flow would be: res.send('some html'); res.render('module.html', {}); res.send('more html'); Now I

  • Passing error message to template through redirect in Express/Node.js 2011-08-16

    In my Node.js application, I have a function (routed by Express) which presents a form to the user: app.get('/register', function (req, res) { res.render('form'); }); I have another function, routed to the same URL, but which handles POST requests, w

  • Error connecting express node.js app to redis server when using requirepass in redis.conf 2011-09-28

    I'm new to node and redis and am setting up a simple server with express to communicate with redis. After starting redis-server, I start the node server app.js app.js starts and runs when I use the redis.conf file without requirepass, but when I add

  • changing type of code wrapper for express + node.js + ejs 2011-11-05

    In client side ejs I use [% code %] instead of <% code %> to mark ejs code, but I would like to do the same on the server side with express. On the client side I would do something like var template = new EJS({text: template_src, type:'['}); He

  • How to receive JSON in express node.js POST request? 2012-01-05

    I send a POST WebRequest from C# along with a json object data. And want to receive it in a node.js server like this: var express = require('express'); var app = express.createServer(); app.configure(function(){ app.use(express.bodyParser()); }); app

  • Express/Node.JS middleware raising error, keeps processing 2012-01-30

    I'm beginning under NodeJS/Express and I'm facing the following problem (I probably didn't get all the tricks of async programming yet) I've made a middleware in charge of checking if a oauth_token paramters is passed (actually implementing oAuth lay

  • static javascript not rendering in jade (with express/node.js) 2012-03-01

    I hope you are well. I'm suddenly unable to render any external javascript in jade templates! To get to the bottom of things, I stripped it down to the bare minimum : Node 0.6.11, Express 2.5.8, jade 0.20.3 app.js var express = require('express') , r

  • Understanding vhost in Express Node.js 2012-03-03

    I am trying to understand how vhost actually works in Express JS. Here's a working code sample (forgot where I pulled this from): // -- inside index.js -- var EXPRESS = require('express'); var app = EXPRESS.createServer(); app.use(EXPRESS.vhost('dev.

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.101 (s). 11 q(s)