Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Mac OS X install fails #217

Closed
andCulture opened this issue Jan 10, 2014 · 9 comments
Closed

Mac OS X install fails #217

andCulture opened this issue Jan 10, 2014 · 9 comments

Comments

@andCulture
Copy link

Received the following running 'sudo npm install node-sass' on my Mac OSX 10.9.1 machine.

sudo npm install node-sass
inpm WARN package.json EPM4@4.0.0 No repository field.
npm WARN package.json docco@0.6.1 No repository field.
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/optimist
npm http GET https://registry.npmjs.org/node-watch
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/mocha
npm http GET https://registry.npmjs.org/colors/0.6.0-1
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/colors/0.6.0-1
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/mocha
npm http 304 https://registry.npmjs.org/node-watch
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/minimist
npm http GET https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/growl
npm http GET https://registry.npmjs.org/jade/0.26.3
npm http GET https://registry.npmjs.org/diff/1.0.7
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/glob/3.2.3
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/growl
npm http 304 https://registry.npmjs.org/jade/0.26.3
npm http 304 https://registry.npmjs.org/diff/1.0.7
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/commander/0.6.1
npm http 304 https://registry.npmjs.org/glob/3.2.3
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/mkdirp/0.3.0
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/mkdirp/0.3.0
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/sigmund

> node-sass@0.7.0 install /Users/winton/Documents/clients/andculture/Tops/epm4/node_modules/node-sass
> node build.js

  CXX(target) Release/obj.target/binding/binding.o
In file included from ../binding.cpp:7:
../sass_context_wrapper.h:10:3: error: unknown type name 'uv_work_t'
  uv_work_t request;
  ^
../sass_context_wrapper.h:20:3: error: unknown type name 'uv_work_t'
  uv_work_t request;
  ^
../binding.cpp:13:20: error: unknown type name 'uv_work_t'
void WorkOnContext(uv_work_t* req) {
                   ^
../binding.cpp:19:22: error: unknown type name 'uv_work_t'
void MakeOldCallback(uv_work_t* req) {
                     ^
../binding.cpp:20:17: error: calling a private constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8.h:768:13: note: declared private here
  V8_INLINE HandleScope() {}
            ^
../binding.cpp:29:13: error: no matching function for call to 'New'
            Local<Value>::New(Null()),
            ^~~~~~~~~~~~~~~~~
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8.h:383:29: note: candidate function template not viable: requires 2 arguments, but 1 was provided
  V8_INLINE static Local<T> New(Isolate* isolate,
                            ^
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8.h:381:29: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_INLINE static Local<T> New(Isolate* isolate, Handle<T> that);
                            ^
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8.h:406:29: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_INLINE static Local<T> New(Isolate* isolate, T* that);
                            ^
../binding.cpp:30:13: error: no matching function for call to 'New'
            Local<Value>::New(String::New(ctx->output_string))
            ^~~~~~~~~~~~~~~~~
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8.h:383:29: note: candidate function template not viable: requires 2 arguments, but 1 was provided
  V8_INLINE static Local<T> New(Isolate* isolate,
                            ^
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8.h:381:29: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_INLINE static Local<T> New(Isolate* isolate, Handle<T> that);
                            ^
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8.h:406:29: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_INLINE static Local<T> New(Isolate* isolate, T* that);
                            ^
../binding.cpp:33:24: error: member reference type 'v8::Persistent<v8::Function>' is not a pointer
        ctx_w->callback->Call(Context::GetCurrent()->Global(), argc, argv);
        ~~~~~~~~~~~~~~~^
../binding.cpp:38:13: error: no matching function for call to 'New'
            Local<Value>::New(String::New(ctx->error_message))
            ^~~~~~~~~~~~~~~~~
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8.h:383:29: note: candidate function template not viable: requires 2 arguments, but 1 was provided
  V8_INLINE static Local<T> New(Isolate* isolate,
                            ^
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8.h:381:29: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_INLINE static Local<T> New(Isolate* isolate, Handle<T> that);
                            ^
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8.h:406:29: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_INLINE static Local<T> New(Isolate* isolate, T* that);
                            ^
../binding.cpp:41:24: error: member reference type 'v8::Persistent<v8::Function>' is not a pointer
        ctx_w->callback->Call(Context::GetCurrent()->Global(), argc, argv);
        ~~~~~~~~~~~~~~~^
../binding.cpp:50:31: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> OldRender(const Arguments& args) {
                              ^~~~~~~~~
                              v8::internal::Arguments
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8.h:141:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../binding.cpp:51:17: error: calling a private constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8.h:768:13: note: declared private here
  V8_INLINE HandleScope() {}
            ^
../binding.cpp:69:45: error: 'New' is a private member of 'v8::Persistent<v8::Function, v8::NonCopyablePersistentTraits<v8::Function> >'
    ctx_w->callback = Persistent<Function>::New(callback);
                                            ^
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8.h:722:23: note: declared private here
  V8_INLINE static T* New(Isolate* isolate, T* that);
                      ^
../binding.cpp:69:57: error: too few arguments to function call, expected 2, have 1
    ctx_w->callback = Persistent<Function>::New(callback);
                      ~~~~~~~~~~~~~~~~~~~~~~~~~         ^
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8.h:722:3: note: 'New' declared here
  V8_INLINE static T* New(Isolate* isolate, T* that);
  ^
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8config.h:302:20: note: expanded from macro 'V8_INLINE'
# define V8_INLINE inline __attribute__((always_inline))
                   ^
../binding.cpp:72:32: error: use of undeclared identifier 'uv_default_loop'
    int status = uv_queue_work(uv_default_loop(), &ctx_w->request, WorkOnContext, (uv_after_work_cb)MakeOldCallback);
                               ^
../binding.cpp:78:19: error: unknown type name 'uv_work_t'
void MakeCallback(uv_work_t* req) {
                  ^
../binding.cpp:79:17: error: calling a private constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8.h:768:13: note: declared private here
  V8_INLINE HandleScope() {}
            ^
../binding.cpp:88:13: error: no matching function for call to 'New'
            Local<Value>::New(String::New(ctx->output_string))
            ^~~~~~~~~~~~~~~~~
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8.h:383:29: note: candidate function template not viable: requires 2 arguments, but 1 was provided
  V8_INLINE static Local<T> New(Isolate* isolate,
                            ^
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8.h:381:29: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_INLINE static Local<T> New(Isolate* isolate, Handle<T> that);
                            ^
/Users/winton/.node-gyp/0.11.9/deps/v8/include/v8.h:406:29: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_INLINE static Local<T> New(Isolate* isolate, T* that);
                            ^
../binding.cpp:91:24: error: member reference type 'v8::Persistent<v8::Function>' is not a pointer
        ctx_w->callback->Call(Context::GetCurrent()->Global(), argc, argv);
        ~~~~~~~~~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/binding/binding.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/winton/.nvm/v0.11.9/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:101:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:827:12)
gyp ERR! System Darwin 13.0.0
gyp ERR! command "node" "/Users/winton/.nvm/v0.11.9/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/winton/Documents/clients/andculture/Tops/epm4/node_modules/node-sass
gyp ERR! node -v v0.11.9
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok 
Build failed
npm ERR! node-sass@0.7.0 install: `node build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-sass@0.7.0 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 build.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! System Darwin 13.0.0
npm ERR! command "/Users/winton/.nvm/v0.11.9/bin/node" "/Users/winton/.nvm/v0.11.9/bin/npm" "install" "node-sass"
npm ERR! cwd /Users/winton/Documents/clients/andculture/Tops/epm4
npm ERR! node -v v0.11.9
npm ERR! npm -v 1.3.15
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/winton/Documents/clients/andculture/Tops/epm4/npm-debug.log
npm ERR! not ok code 0
@kennethormandy
Copy link
Contributor

As far as I know Node-sass only works with Node 0.10.x right now, so you could install the current version instead or use something like nvm. (Sorry if you already know all that stuff, just thought I’d mention it!)

@andCulture
Copy link
Author

Yep, switched to 0.10 with NVM and I'm good to go. Thanks for the quick response!

@deanmao
Copy link
Contributor

deanmao commented Jan 10, 2014

If you do need to use node 0.11, the master repo builds fine with that -- be sure to update your node-gyp though

@karloscarweber
Copy link

This Worked for me as well. There should probably be a warning flag in the readme explaining that it doesn't work with node 0.11.x

@GabLeRoux
Copy link

I had a similar issue using node v0.12 and v0.11

What worked for me

I uninstalled everything related to node, installed nvm and used node v0.10.0 instead.

brew uninstall --force node
brew uninstall --force nvm
brew install node
brew install nvm

Followed instructions

nvm install 0.10

######################################################################## 100,0%
Now using node v0.10.38 (npm v1.4.28)

npm install

Everything working fine now :)

Edit

Well this didn't work when running grunt sass for some reason

Loading "scss.js" tasks...ERROR
>> Error: `/path/to/project/node_modules/grunt-contrib-scss/node_modules/node-sass/bin/darwin-x64-v8-3.28/binding.node` is missing. Try reinstalling `node-sass`?

#497 seems more related

So I tried to reinstall everything using newer versions, it did not work with 0.12, but worked with 0.10.

npm uninstall coffeelint grunt-coffeelint grunt-contrib-coffee grunt-contrib-connect  grunt-contrib-jshint grunt-contrib-sass grunt-contrib-scss grunt-contrib-watch grunt-sass grunt-shell load-grunt-tasks node-sass --save-dev
npm install coffeelint grunt-coffeelint grunt-contrib-coffee grunt-contrib-connect  grunt-contrib-jshint grunt-contrib-sass grunt-contrib-scss grunt-contrib-watch grunt-sass grunt-shell load-grunt-tasks node-sass --save-dev

And now everything is really working fine.

What I had

Related dependency "grunt-contrib-sass": "^0.8.1",

Output from npm install command when using node v0.11.16:

npm WARN package.json project@0.0.0 No description
npm WARN package.json project@0.0.0 No repository field.
npm WARN package.json project@0.0.0 No README data
|
> node-sass@0.7.0 install /path/to/project/node_modules/grunt-contrib-scss/node_modules/node-sass
> node build.js

child_process: customFds option is deprecated, use stdio instead.
child_process: customFds option is deprecated, use stdio instead.
2015-05-12 23:45:08.046 xcodebuild[15911:55305] [MT] PluginLoading: Required plug-in compatibility UUID 9F75337B-21B4-4ADC-B558-F9CADF7073A7 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Unity4XC.xcplugin' not present in DVTPlugInCompatibilityUUIDs
  CXX(target) Release/obj.target/binding/binding.o
In file included from ../binding.cpp:7:
../sass_context_wrapper.h:10:3: error: unknown type name 'uv_work_t'
  uv_work_t request;
  ^
../sass_context_wrapper.h:20:3: error: unknown type name 'uv_work_t'
  uv_work_t request;
  ^
../binding.cpp:13:20: error: unknown type name 'uv_work_t'
void WorkOnContext(uv_work_t* req) {
                   ^
../binding.cpp:19:22: error: unknown type name 'uv_work_t'
void MakeOldCallback(uv_work_t* req) {
                     ^
../binding.cpp:20:17: error: calling a protected constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/gableroux/.node-gyp/0.11.16/deps/v8/include/v8.h:816:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../binding.cpp:29:31: error: no matching function for call to 'Null'
            Local<Value>::New(Null()),
                              ^~~~
/Users/gableroux/.node-gyp/0.11.16/deps/v8/include/v8.h:6615:19: note: candidate function not viable: requires single
      argument 'isolate', but no arguments were provided
Handle<Primitive> Null(Isolate* isolate) {
                  ^
../binding.cpp:30:39: error: no member named 'New' in 'v8::String'
            Local<Value>::New(String::New(ctx->output_string))
                              ~~~~~~~~^
../binding.cpp:33:24: error: member reference type 'v8::Persistent<v8::Function>' is not a pointer; maybe you meant to
      use '.'?
        ctx_w->callback->Call(Context::GetCurrent()->Global(), argc, argv);
        ~~~~~~~~~~~~~~~^~
                       .
../binding.cpp:33:26: error: no member named 'Call' in 'v8::Persistent<v8::Function,
      v8::NonCopyablePersistentTraits<v8::Function> >'
        ctx_w->callback->Call(Context::GetCurrent()->Global(), argc, argv);
        ~~~~~~~~~~~~~~~  ^
../binding.cpp:33:40: error: no member named 'GetCurrent' in 'v8::Context'
        ctx_w->callback->Call(Context::GetCurrent()->Global(), argc, argv);
                              ~~~~~~~~~^
../binding.cpp:38:39: error: no member named 'New' in 'v8::String'
            Local<Value>::New(String::New(ctx->error_message))
                              ~~~~~~~~^
../binding.cpp:41:24: error: member reference type 'v8::Persistent<v8::Function>' is not a pointer; maybe you meant to
      use '.'?
        ctx_w->callback->Call(Context::GetCurrent()->Global(), argc, argv);
        ~~~~~~~~~~~~~~~^~
                       .
../binding.cpp:41:26: error: no member named 'Call' in 'v8::Persistent<v8::Function,
      v8::NonCopyablePersistentTraits<v8::Function> >'
        ctx_w->callback->Call(Context::GetCurrent()->Global(), argc, argv);
        ~~~~~~~~~~~~~~~  ^
../binding.cpp:41:40: error: no member named 'GetCurrent' in 'v8::Context'
        ctx_w->callback->Call(Context::GetCurrent()->Global(), argc, argv);
                              ~~~~~~~~~^
../binding.cpp:50:31: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
Handle<Value> OldRender(const Arguments& args) {
                              ^~~~~~~~~
                              v8::internal::Arguments
/Users/gableroux/.node-gyp/0.11.16/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../binding.cpp:51:17: error: calling a protected constructor of class 'v8::HandleScope'
    HandleScope scope;
                ^
/Users/gableroux/.node-gyp/0.11.16/deps/v8/include/v8.h:816:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../binding.cpp:55:13: error: no member named 'AsciiValue' in 'v8::String'
    String::AsciiValue astr(args[0]);
    ~~~~~~~~^
../binding.cpp:56:58: error: type 'const v8::internal::Arguments' does not provide a subscript operator
    Local<Function> callback = Local<Function>::Cast(args[1]);
                                                     ~~~~^~
../binding.cpp:57:13: error: no member named 'AsciiValue' in 'v8::String'
    String::AsciiValue bstr(args[2]);
    ~~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/binding/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/gableroux/.nvm/v0.11.16/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "node" "/Users/gableroux/.nvm/v0.11.16/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /path/to/project/node_modules/grunt-contrib-scss/node_modules/node-sass
gyp ERR! node -v v0.11.16
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
Build failed
npm ERR! Darwin 14.3.0
npm ERR! argv "/Users/gableroux/.nvm/v0.11.16/bin/node" "/Users/gableroux/.nvm/v0.11.16/bin/npm" "install"
npm ERR! node v0.11.16
npm ERR! npm  v2.3.0
npm ERR! code ELIFECYCLE

npm ERR! node-sass@0.7.0 install: `node build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@0.7.0 install script 'node build.js'.
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 build.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! Please include the following file with any support request:
npm ERR!     /path/to/project/npm-debug.log

@xzyfer
Copy link
Contributor

xzyfer commented May 13, 2015

You have a couple problems here that pretty much all come down to that fact that you're install an ancient version of node-sass with an ancient version of npm. There real solution for pretty much any install related issues is

# install a recent npm version
npm install -g npm

# clear the npm cache
npm cache clean

# install the latest node-sass

## if you're using grunt-sass
npm install grunt-sass@latest

## if you're using gulp-sass
npm install gulp-sass@latest

## else install the latest node-sass
npm install node-sass@latest

@banerjed
Copy link

banerjed commented Jun 5, 2015

Having some difficulties installing node-sass on MAC OSX 10.6.8

I did follow the instructions above from xzyfer but that did not help.
npm version 2.10.1

libsass info - version 3.2.4
Dman-MBA-4:package banerjed$ ls -l /usr/local/lib/libsass.*
lrwxr-xr-x 1 banerjed admin 43 Jun 5 11:48 /usr/local/lib/libsass.0.dylib -> ../Cellar/libsass/3.2.4/lib/libsass.0.dylib
lrwxr-xr-x 1 banerjed admin 37 Jun 5 11:48 /usr/local/lib/libsass.a -> ../Cellar/libsass/3.2.4/lib/libsass.a
lrwxr-xr-x 1 banerjed admin 41 Jun 5 11:48 /usr/local/lib/libsass.dylib -> ../Cellar/libsass/3.2.4/lib/libsass.dylib

The logs seem to indicate that the binary is corrupt, after which it tries to build the software and then runs into other issues

Dman-MBA-4:~ banerjed$ sudo npm install gulp-sass@latest
\

node-sass@3.1.2 install /Users/banerjed/node_modules/gulp-sass/node_modules/node-sass
node scripts/install.js

Binary downloaded and installed at /Users/banerjed/node_modules/gulp-sass/node_modules/node-sass/vendor/darwin-x64-14/binding.node

node-sass@3.1.2 postinstall /Users/banerjed/node_modules/gulp-sass/node_modules/node-sass
node scripts/build.js

/Users/banerjed/node_modules/gulp-sass/node_modules/node-sass/vendor/darwin-x64-14/binding.node exists.
testing binary.
Problem with the binary.
Manual build incoming.
Building: /usr/local/bin/node node_modules/pangyp/bin/node-gyp rebuild --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
CXX(target) Release/obj.target/libsass/src/libsass/ast.o
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-stdlib=libc++"
make: *** [Release/obj.target/libsass/src/libsass/ast.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/banerjed/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/lib/build.js:271:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 10.8.0
gyp ERR! command "/usr/local/bin/node" "/Users/banerjed/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/bin/node-gyp" "rebuild" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/banerjed/node_modules/gulp-sass/node_modules/node-sass
gyp ERR! node -v v0.12.4
gyp ERR! pangyp -v v2.2.1
gyp ERR! not ok
Build failed
npm ERR! Darwin 10.8.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "gulp-sass@latest"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.1.2 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.1.2 postinstall script 'node scripts/build.js'.
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 scripts/build.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! Please include the following file with any support request:
npm ERR! /Users/banerjed/npm-debug.log

jamesw-minted pushed a commit to jamesw-minted/node-sass that referenced this issue May 11, 2017
Add a Gitter chat badge to README.md
@polotto
Copy link

polotto commented May 31, 2021

I had the same problem and I solved with the steps:

  1. if your are on Apple M1 Chip, run terminal with Rosetta 2
  2. check your node-sass version in your package.json and compare with the following table:
NodeJS Supported node-sass version Node Module
Node 16 6.0+ 93
Node 15 5.0+ 88
Node 14 4.14+ 83
Node 13 4.13+, <5.0 79
Node 12 4.12+ 72
Node 11 4.10+, <5.0 67
Node 10 4.9+, <6.0 64
Node 8 4.5.3+, <5.0 57
Node <8 <5.0 <57
  1. install the Nodejs version according with your node-sass
  2. clean old node_modules with: rm -rf node_modules
  3. run: npm install

Resource:

@antoniosb
Copy link

@polotto awesome, just saved my life!

I'm running on a M1 chip and it worked out just bumping node-sass version to ^6.0

jiongle1 pushed a commit to scantist-ossops-m2/node-sass that referenced this issue Apr 7, 2024
jiongle1 pushed a commit to scantist-ossops-m2/node-sass that referenced this issue Apr 7, 2024
Fix issue sass#217: wrong file property value in source map.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants