Giter Club home page Giter Club logo

node-sass's Introduction

Sass

@SassCSS on Twitter    stackoverflow    Gitter

Sass makes CSS fun again. Sass is an extension of CSS, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a plugin for your build system.

$font-stack: Helvetica, sans-serif;
$primary-color: #333;

body {
  font: 100% $font-stack;
  color: $primary-color;
}

@mixin border-radius($radius) {
  -webkit-border-radius: $radius;
     -moz-border-radius: $radius;
      -ms-border-radius: $radius;
          border-radius: $radius;
}

nav {
  ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  li { @include border-radius(10px); }

  a {
    display: block;
    padding: 6px 12px;
    text-decoration: none;
  }
}

Install Sass

You can install Sass on Windows, Mac, or Linux by downloading the package for your operating system from GitHub and adding it to your PATH. That's all—there are no external dependencies and nothing else you need to install.

If you use Node.js, you can also install Sass using npm by running

npm install -g sass

However, please note that this will install the pure JavaScript implementation of Sass, which runs somewhat slower than the other options listed here. But it has the same interface, so it'll be easy to swap in another implementation later if you need a bit more speed!

See the Sass website for more ways to install Sass.

Once you have Sass installed, you can run the sass executable to compile .sass and .scss files to .css files. For example:

sass source/stylesheets/index.scss build/stylesheets/index.css

Learn Sass

Check out the Sass website for a guide on how to learn Sass!

This Repository

This repository isn't an implementation of Sass. Those live in sass/dart-sass and sass/libsass. Instead, it contains:

  • spec/, which contains specifications for language features.
  • proposal/, which contains in-progress proposals for changes to the language.
  • accepted/, which contains proposals that have been accepted and are either implemented or in the process of being implemented.

Note that this doesn't contain a full specification of Sass. Instead, feature specifications are written as needed when a new feature is being designed or when an implementor needs additional clarity about how something is supposed to work. This means many of the specs in spec/ only cover small portions of the features in question.

Versioning Policy

The proposals in this repository are versioned, to make it easy to track changes over time and to refer to older versions. Every version has a Git tag of the form proposal.<name>.draft-<version>. A new version should be created for each batch of changes.

Every version has a major version, and they may have a minor version as well (indicated <major>.<minor>). The minor version should be incremented for changes that don't affect the intended semantics of the proposal; otherwise, the major version should be incremented.

node-sass's People

Contributors

akiran avatar am11 avatar andrew avatar arian avatar blopker avatar bwilkins avatar deanmao avatar deepak1556 avatar dependabot[bot] avatar dotzero avatar gonghao avatar hamptonmakes avatar jakobo avatar jhnns avatar keithamus avatar kevva avatar kkoopa avatar larsimmisch avatar laurentgoderre avatar mgol avatar msokk avatar nschonni avatar qulogic avatar rvagg avatar samccone avatar saper avatar sindresorhus avatar stefanpenner avatar xhmikosr avatar xzyfer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-sass's Issues

camelCase

I noticed node-sass got a couple of options now. Any reason they're not in the usual JS camelCase?

include_paths -> includePaths

Using underscore in variable names is not very JS like, and JSHint complains like a mad tool when I do use it.

Doesn't work in Node 0.8.x

Testcase:

var sass = require('node-sass');
sass.render('body{background:blue; a{color:black;}}', function(err, css){
  console.log(css)
});

In Node 0.6.x:

body {
  background: blue;
}
body a {
    color: black;
}

In Node 0.8.x it never finishes...

Mysterious compile error

Hi everyone,

i just got the following:

% ./../../node_modules/node-sass/bin/node-sass desktop.scss
Starting Render Process...
File data read successfully, rendering css
[1]    8222 segmentation fault (core dumped)  ./../../node_modules/node-sass/bin/node-sass desktop.scss

Sadly, there is no core to be found...

I don't have anything special in the file i think. Three imports, a few variables and mixins.

Greetz

Compass Compiling

When I try and compile a .scss file that contains a compass mix-in it breaks. Is this something being considered for future enhancement?

Update libsass to the latest build

Hi,
I really like your implementation of libsass into a NodeJS module, but the library you are using is really old. There are some major bugfixes / changes that I think would be really good to have. For example, your libsass can't support variable argument length, yet: sass/libsass#73
This was fixed a while ago in libsass, so it would be cool if you could just pull an updated build of libsass. :)

Thanks!

question

First, thanks for putting this project together--I'm really excited to see it come to fruition!

So, on to my question:

Will you be including a binary for windows? I'm heading up the http://github.com/gruntjs/grunt-contrib repo, which is an addon-pack for the javascript build tool http://github.com/cowboy/grunt. I'd love to leverage this to include a sass compilation task. The reason I ask about the binary is because one of the criteria we've set is that everything runs out of the box on any OSX/Windows/Linux machine with nothing but npm install.

Thanks!

Find a better default than nodesass.css

Hi everyone,

i'd find it convenient if node-sass would create an equally named CSS file to a S(A|C)SS file instead of a nodesass.css. This would be as easy as adding a few string operations to replace the file extension of fileName and store it in outFile if cssName is not given (see bin/node-sass line 32).

If you like i could do the changes and give a pull request.

Greetz,
dctr

output_style problems

[Important: currently the argument output_style has some problem which may cause the output css becomes nothing because of the libsass, so you should not use it now!]

@andrew can you link to the relevant libsass issue?

Works locally but fails to understand variable arguments on Heroku

I have a project fully working locally (OSX Mountain Lion).
It uses mincer that compiles my scss files using node-sass.
I @import the bourbon library and it works OK (though I had to exclude 2 files, but I don't need them anyway).

But when I deploy the project to Heroku I get this error:

ERROR -- /app/assets/vendor/bourbon/functions/compact, line 3: parameter list for compact requires a ')'

Which most probably refers to bourbon's use of splats: https://github.com/thoughtbot/bourbon/blob/master/app/assets/stylesheets/functions/_compact.scss#L3

How can it be / what should I do?:)
Using node 0.8.19 and node-sass 0.3.0.
The only difference I can see is the OS / architecture

npm install node-sass fails - Ubuntu 12.10 npm binary installl via aptitiude

When installing the package via NPM, i recieve the following. Any ideas where to look to fix it?

[email protected] install /home/dcbartlett/node_modules/node-sass
node rebuild.js

sh: 1: node: not found
npm ERR! error installing [email protected]
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
npm WARN /usr/share/doc/nodejs/README.Debian
npm WARN

npm ERR! [email protected] install: node rebuild.js
npm ERR! sh "-c" "node rebuild.js" failed with 127
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node rebuild.js
npm ERR! You can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 3.5.0-17-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "node-sass"
npm ERR! cwd /home/dcbartlett
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] install: node rebuild.js
npm ERR! message sh "-c" "node rebuild.js" failed with 127
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/dcbartlett/npm-debug.log
npm not ok

npm-debug.log can be found here...

https://github.com/dcbartlett/psu/blob/master/npm-debug.log

node-sass fails to work on 32-bit systems

On 32-bit systems, node-sass installs easily with npm but cannot be used; node gives the following error:

node-sass/precompiled/linux/binding.node: wrong ELF class: ELFCLASS64

In order to get it working, I had to manually download binding.gyp from the git repo and then run npm install again, in order to rebuild node-sass as a 32-bit library.

segmentation fault when parsing invalid sass

This is both a sort of proposal as well as an issue:
If invalid css is being used, the module segfaults.

So proposal is to do a normal node-style callback with cb(err,result) and to catch the segfault in some way.

Example css used:

$theme: 'ace';
$theme.checkbox {
  border: 0px none;

  &.disabled {
    opacity: .5;
  }
}

sunos Support

Tried to deploy my application running node-sass earlier when this problem cropped up:

error:   Error: Cannot find module '/opt/haibu/apps/fauntleroy/tandemdraw/package/node_modules/igneous/node_modules/node
-sass/precompiled/sunos-x64/binding'
error:       at Function.Module._resolveFilename (module.js:338:15)
error:       at Function.Module._load (module.js:280:25)
error:       at Module.require (module.js:362:17)
error:       at require (module.js:378:17)
error:       at Object.<anonymous> (/opt/haibu/apps/fauntleroy/tandemdraw/package/node_modules/igneous/node_modules/node
-sass/sass.js:11:13)
error:       at Module._compile (module.js:449:26)
error:       at Object.Module._extensions..js (module.js:467:10)
error:       at Module.load (module.js:356:32)
error:       at Function.Module._load (module.js:312:12)
error:       at Module.require (module.js:362:17)

A quick glance at the precompiled folder reveals that there's nothing there for sunos. Any chance we could get it? Alternatively, is there some way node-sass could attempt to compile when no precompiled files are available?

CSS not recompiling

I have an express app configured like this

app.configure(function(){

    app.set('views', __dirname + '/buildkit/views');
    app.set('view engine', 'jade');
    app.set('view options', {pretty: true});
    app.use(express.favicon());
    app.use(express.logger('dev'));
    app.use(express.bodyParser());
    app.use(express.methodOverride());
    app.locals.pretty = true;
    app.use(express.static(__dirname + '/buildkit/assets'));
    app.use(sass.middleware({
        src: __dirname + '/buildkit/assets/sass_help'
        , dest: __dirname + '/buildkit/assets'
        , debug: true
    }));

});

I have an empty directory '/buildkit/assets/css/'

My template calls

<link rel="stylesheet" href="/css/help.css">

The first time I call my page it renders without the CSS. Hoever the CSS is built correctly at this time and is stored as help.css under the '/buildkit/assets/css/' directory.

When I call my page again the page renders with the CSS correctly.

However after editing the help.scss file, no change occur in help.css not matter how many time I refresh. I only see the changes if I delete help.css and refresh my page twice.

I am running on Mac OS Mountain Lion. Node v0.8.8

@extend improperly works with nested selectors?

    .x {
        color: red;
        .y {
            color: blue;
        }
    }
    .z { @extends .x; }

compiles to

    .x, .z { color: red; }
    .x .y { color: blue; }

while it should be (as it works with Ruby Sass):

    .x, .z { color: red; }
    .x .y, .z .y { color: blue; }

I assume it's an issue with underlying libsass, but I'm not sure. Encountered this while porting some files from Ruby project to express project with mincer.

Folder context

Would be very useful with some folder context so you can specify relative imports.

periodic errors

Hi there.

Ive been using node-sass as part of grunt-sass (set to auto regenerate with grunts watch task) and have been seeing the following periodic errors.

Error shown;
node(14524,0x1017bb000) malloc: *** mmap(size=1152921504876556288) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
terminate called throwing an exceptionAbort trap: 6

The errors seem to happen randomly, roughly once in every 10 runs. If I build again after an error, everything goes fine.

Any idea what could cause that?
Cheers,
Greg

O.S. = Mac OS X
node-sass v0.2.4 as part of grunt-sass v0.2.4

Grunt plugin for node-sass

Is it possible to create a gruntjs plugin for node-sass ? The current contrib-sass versionis painfully slow, at least in windows. I think it is slow because of the start-up time of the ruby code for sass. It would be great if I can test node-sass with gruntjs and evaluate the performance.

(Or will this plugin just work with grunt? In that case please add it to the plugins section in the gruntjs.com site - Plugins must be published on NPM with the "gruntplugin" keyword.)

Segmentation fault: 11

Hey, I am getting this error on the .render() api method.
I noticed some people are having this issue on for grunt-sass as well:
sindresorhus/grunt-sass#2

I am testing with really simple code with no errors:
var str = "#main
{
.more
{
}
}"

//

sass.render(str, function (err, data) { // Segmentation fault 11 } );

Discrepancies between node-sass parsing and the ruby gem

Hi there, there seems to be some differences between node-sass and ruby gem regarding string handling.

e.g.
For desired css of the form;

background: url(/static_loc/img/beta.png);

I was able to write the following sass;

$base_url: "/static_loc/";
background-image: "url("#{$base_url}"img/beta.png)";

However, when I switched to the ruby gem (due to #33) I had to omit several quotes to get the same css;

$base_url: "/static_loc/";
background-image: url(#{$base_url}img/beta.png);

Not a massive issue (I can probably refactor it so it works for both) but I thought it'd help to raise an issue as I assume you folks want to keep all sass parsers in sync?

Cheers,
Greg

npm Package

When is the npm package expected? I've been getting more and more into Node and npm lately. Could I halp in any way?

Fails with node v0.10.0

The binding doesn't appear to be compatible.

$ node --version
v0.10.0
$ node
> require('node-sass')
Error: Module version mismatch. Expected 11, got 1.
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (.../node_modules/node-sass/sass.js:11:13)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

Also, I wasn't able to get a new version of the binding to compile, FWIW.

Windows support

There is currently no windows support for node-sass. npm install node-sass does install, but doesn't attempt to build.

When building, a torrent of errors is being generated, especially in compiling the libsass files (see: https://gist.github.com/3885949)

I would love to have a precompiled binary for windows, but my C++ knowledge is not that good that I can tackle this issue. In what way can I assist?

I already tried compiling libsass with MinGW, which sort of works, but this causes other issues with linking.

@include problem on Windows

I have troube to get this compiled on windows:

@include media1024( false, false ) {
    height:400px;
};

Warning: ERROR -- c:/git_out/project/styles/main, line 25: non-terminal
statement or declaration must end with ';'

It works fine on Linux. Any ideas?

"precompiled/win32-x64/binding" missing

When installing normally from npm, I can't seem to get the two precompiled windows folders. Are these only in master? When will a new version be pushed to npm?

Compass Support?

Does this support compass? I think the readme should alert users as to whether 3rd party SASS extensions can be used. It looks to me like this is not possible, and that this just supports normal SASS compilation.

Problem running this on Arm

Hey I am getting the following issue when trying to run this on a Raspberry Pi, Debian 32bit arm..

pi@raspberrypi ~/playground/node-sass $ node test.js

module.js:340
throw err;
^
Error: Cannot find module '/home/pi/playground/node-sass/precompiled/linux-arm/binding'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object. (/home/pi/playground/node-sass/sass.js:11:13)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)

This is stopping my whole project atm as I really want to use the Sails framework which uses your module.. Please tell me I just have to change something simple to make it work?

Thanks a lot for any help

SASS, not SCSS

Hey adnrew,

I'm a bit confused, the lib is called node-sass, but it seems like it processes scss only for me. When I'm trying to compile just anything simple lie

body
  background: pink

I'm getting this error

ERROR -- , line 1: invalid top-level expression

Maybe i'm doing something wrong?

Ruby replacement

I think this could be a very good idea to make an installer for an aplication that can replace Ruby's sass gem, because a lot of IDE extensions and plugins are using this gem and Ruby is quite slow (especially on Windows). It could be just a node.js application that will be called via 'sass' command using a command-line scripting language (.sh , .bat etc.)

For Windows i've found https://github.com/zaus/Sassifier , but the idea of a node.js standalone (or not) app, that can FAST process sass using native C extension is great

Cannot compile @keyframes

I'm trying to compile following .scss but getting "undefined" as output

@mixin keyframes( $name )
{
    @keyframes $name {
        @content;
    }
}

@include keyframes( toggle )
{
    0% {
        height: 0%;
        width: 0%;
    }

    100% {
        height: 100%;
        width: 100%;
    }
}

is this related to libsass?

More Comprehensive example

Andrew,

I am fairly new to node. Can you give (or point me in the right direction) where your node plugin will interact with express and jade? I really want to use Sass instead of Stylus, so any help will be apreciated.

Thanks,

Kianosh

Readme

Hey, thanks for the work on this so far.

Could you update the readme to explain the current status of the project, i.e. if all of the features of sass are supported yet?

I'd love to be able to use this and also contribute if possible.

Thanks again!

heroku build fail

Can't use node-sass on heroku

output of git push heroku master

-----> Heroku receiving push
-----> Node.js app detected
-----> Resolving engine versions
       Using Node.js version: 0.6.18
       Using npm version: 1.0.106
-----> Fetching Node.js binaries
-----> Vendoring node into slug
-----> Installing dependencies with npm

       > [email protected] preinstall /tmp/build_204xggsybwkog/node_modules/node-sass
       > node-waf clean || true; node-waf configure build

       Nothing to clean (project not configured)
       Checking for program g++ or c++          : /usr/bin/g++ 
       Checking for program cpp                 : /usr/bin/cpp 
       Checking for program ar                  : /usr/bin/ar 
       Checking for program ranlib              : /usr/bin/ranlib 
       Checking for g++                         : ok  
       Checking for node path                   : not found 
       Checking for node prefix                 : ok /tmp/node-node-4r7U 
       'configure' finished successfully (0.103s)
       Waf: Entering directory `/tmp/build_204xggsybwkog/node_modules/node-sass/build'
       g++ -c -Wall -O2 -fPIC context.cpp -o context.o
       g++ -c -Wall -O2 -fPIC functions.cpp -o functions.o
       g++ -c -Wall -O2 -fPIC document.cpp -o document.o
       g++ -c -Wall -O2 -fPIC document_parser.cpp -o document_parser.o
       g++ -c -Wall -O2 -fPIC eval_apply.cpp -o eval_apply.o
       g++ -c -Wall -O2 -fPIC node.cpp -o node.o
       g++ -c -Wall -O2 -fPIC node_factory.cpp -o node_factory.o
       g++ -c -Wall -O2 -fPIC node_emitters.cpp -o node_emitters.o
       g++ -c -Wall -O2 -fPIC prelexer.cpp -o prelexer.o
       g++ -c -Wall -O2 -fPIC sass_interface.cpp -o sass_interface.o
       In file included from sass_interface.cpp:10:
       sass_interface.h:1:18: error: node.h: No such file or directory
       In file included from sass_interface.cpp:10:
       sass_interface.h:23: error: 'uv_work_t' does not name a type
       sass_interface.h:24: error: 'v8' has not been declared
       sass_interface.h:24: error: ISO C++ forbids declaration of 'Persistent' with no type
       sass_interface.h:24: error: expected ';' before '<' token
       make: *** [sass_interface.o] Error 1
       [1/2] cxx: binding.cpp -> build/Release/binding_1.o
       Waf: Leaving directory `/tmp/build_204xggsybwkog/node_modules/node-sass/build'
       Build failed: 'NoneType' object has no attribute 'parent'
       npm ERR! error installing [email protected] Error: [email protected] preinstall: `node-waf clean || true; node-waf configure build`
       npm ERR! error installing [email protected] `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 1
       npm ERR! error installing [email protected]     at ChildProcess.<anonymous> (/tmp/node-npm-mPnf/lib/utils/exec.js:49:20)
       npm ERR! error installing [email protected]     at ChildProcess.emit (events.js:70:17)
       npm ERR! error installing [email protected]     at maybeExit (child_process.js:362:16)
       npm ERR! error installing [email protected]     at Process.onexit (child_process.js:398:5)
       npm ERR! [email protected] preinstall: `node-waf clean || true; node-waf configure build`
       npm ERR! `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 1
       npm ERR! 
       npm ERR! Failed at the [email protected] preinstall script.
       npm ERR! This is most likely a problem with the node-sass package,
       npm ERR! not with npm itself.
       npm ERR! Tell the author that this fails on your system:
       npm ERR!     node-waf clean || true; node-waf configure build
       npm ERR! You can get their info via:
       npm ERR!     npm owner ls node-sass
       npm ERR! There is likely additional logging output above.
       npm ERR! 
       npm ERR! System Linux 2.6.32-343-ec2
       npm ERR! command "/tmp/node-node-4r7U/bin/node" "/tmp/node-npm-mPnf/cli.js" "install" "--production"
       npm ERR! cwd /tmp/build_204xggsybwkog
       npm ERR! node -v v0.6.18
       npm ERR! npm -v 1.0.106
       npm ERR! code ELIFECYCLE
       npm ERR! 
       npm ERR! Additional logging details can be found in:
       npm ERR!     /tmp/build_204xggsybwkog/npm-debug.log
       npm not ok
 !     Failed to install --production dependencies with npm
 !     Heroku push rejected, failed to compile Node.js app

To [email protected]:deep-stream-8198.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:deep-stream-8198.git'

Synchronous / blocking way to render?

I'm essentially trying to do this which clearly won't work because the function returns before the callback does:

compilers.sass = function(path) {
  var content, result;
  content = fs.readFileSync(path, 'utf8');
  result = '';
  sass.render(content, function(err, css) {
    if (err) {
      throw err;
    }
    return result = css;
  });
  return result;
};

Any advice?

Not available by npm?

It doesn't seem this project is available via npm...

$ npm install node-sass
npm http GET https://registry.npmjs.org/node-sass
npm http 404 https://registry.npmjs.org/node-sass

npm ERR! 404 'node-sass' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 
npm ERR! 404 Maybe try 'npm search sass'
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.
npm ERR! 
npm ERR! System Darwin 11.4.0
npm ERR! command "node" "/Users/balupton/.nvm/v0.6.17/bin/npm" "install" "node-sass"
npm ERR! cwd /Volumes/Storage/Users/balupton/Projects/bugherd
npm ERR! node -v v0.6.17
npm ERR! npm -v 1.1.21
npm ERR! code E404
npm ERR! message 404 Not Found: node-sass
npm ERR! errno {}
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Volumes/Storage/Users/balupton/Projects/bugherd/npm-debug.log
npm not ok
$ 

@import fails in node-sass 0.2.4

When attempting to use a simple @import I get the following error message: -

ERROR -- , line 1: error reading file "variables"

My app config: -

app.configure(function(){

    app.set('views', __dirname + '/buildkit/views');
    app.set('view engine', 'jade');
    app.set('view options', {pretty: true});
    app.use(express.favicon());
    app.use(express.logger('dev'));
    app.use(express.bodyParser());
    app.use(express.methodOverride());
    app.locals.pretty = true;
    app.use(sass.middleware({
        "src" : __dirname + '/buildkit/assets/sass',
        "dest" : __dirname + '/buildkit/assets/',
        "debug" : true
    }));
    app.use(express.static(__dirname + '/buildkit/assets'));

});

My SASS 'screen.scss' (in the same directory as '_variables.scss': -

@import "variables";

body {
    background:red;
}

I have also tried importing '_variables.scss'

Any thoughts / help welcome.

node-sass doesn't compile without precompiled libsass

When trying to compile the binding, the compilation process fails with "Build failed: 'NoneType' object has no attribute 'parent'".

After some fiddling, it turns out that manually compiling the libsass included in libsass (by running make in the libsass directory) solves this issue.
For some reason it seems that node-waf configure and or node-waf build don't first build the libsass library itself.

installation fails to compile on ubuntu x86_64

When trying to install node-sass through npm, the compilation process fails while linking.

[2/2] cxx_link: build/Release/binding_1.o libsass/libsass.a -> build/Release/binding.node
/usr/bin/ld: ../libsass/libsass.a(sass_interface.o): relocation R_X86_64_32S against `std::basic_string<char, std::char_traits, std::allocator >::_Rep::_S_empty_rep_storage' can not be used when making a shared object; recompile with -fPIC
../libsass/libsass.a: could not read symbols: Bad value

When manually compiling master, it succeeds.

libsass is not compiled correctly by node-waf

When compiling the cpp extension using node-waf, it appears that libsass is not being correctly built.

$ node-waf configure && node-waf build
$ node
> var sass = require('./sass');
{ render: [Function] }
>  sass.render('scss string')
dyld: lazy symbol binding failed: Symbol not found: _sass_new_context
  Referenced from: /Users/andrew/code/node-sass/build/Release/sass.node
  Expected in: flat namespace

dyld: Symbol not found: _sass_new_context
  Referenced from: /Users/andrew/code/node-sass/build/Release/sass.node
  Expected in: flat namespace

Trace/BPT trap: 5

@hcatlin has a combined makefile for his sassc project that does a similar thing: https://github.com/hcatlin/sassc/blob/master/Makefile

Can't import without extension

Trying to @import a file fails if the extension is not specified:

ERROR -- , line 1: error reading file "test"

From the sass docs:

For example,

@import "foo.scss";
or

@import "foo";

This works:

var sass = require('node-sass');
sass.render('@import "test.scss";body{background:blue; a{color:black;}}', function(err, css){
    console.error(err);
    console.log(css)
});

This does not:

var sass = require('node-sass');
sass.render('@import "test";body{background:blue; a{color:black;}}', function(err, css){
    console.error(err);
    console.log(css)
});

Installation problem

Hey there!

Thanks for putting this together - I'm looking forward to using it! However, I get the following error when trying to install via npm:

cnnr in ~/Desktop/project on master*
⚡ npm install node-sass
npm http GET https://registry.npmjs.org/node-sass
npm http 304 https://registry.npmjs.org/node-sass
npm http GET https://registry.npmjs.org/node-sass/-/node-sass-0.2.1.tgz
npm http 200 https://registry.npmjs.org/node-sass/-/node-sass-0.2.1.tgz
npm http GET https://registry.npmjs.org/mkdirp
npm http 200 https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.3.tgz
npm http 200 https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.3.tgz

> [email protected] install /Users/cnnr/Desktop/marky-node/node_modules/node-sass
> node-gyp rebuild

info it worked if it ends with ok 
info version was already not installed 0.6.18 
ERR! Error: EACCES, mkdir '/Users/cnnr/.node-gyp/0.6.18'
ERR! not ok

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! 
npm ERR! System Darwin 12.0.0
npm ERR! command "node" "/Users/cnnr/nvm/v0.6.18/bin/npm" "install" "node-sass"
npm ERR! cwd /Users/cnnr/Desktop/marky-node
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.21
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] install: `node-gyp rebuild`
npm ERR! message `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! errno {}
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/cnnr/Desktop/marky-node/npm-debug.log
npm not ok

I'm using node v 0.6.18 on OS X. Any ideas what may be going on?

sass.render() crashes on debian

sass.render() method crashes when run on debian linux :

$ node sass.js 
*** glibc detected *** node: double free or corruption (out): 0x0000000001d8e5d0 ***

I posted the full backtrace on http://pastebin.com/ZC26dzsk

When running via grunt-sass, i get this error :

$ grunt sass
Running "sass:dist" (sass) task
node: malloc.c:4636: _int_malloc: Assertion `victim->fd_nextsize->bk_nextsize == victim' failed.
Abandon

The system is Debian 6.0.5 64 bit, linux kernel 2.6.32-5-amd64, node version 0.8.9 (tested with 0.8.7 as well)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.