Closed dcsan closed 5 years ago
I completely agree. I regret adding this as a dependency. How do we fix this without leaving sass users high and dry?
you mean mainly the element of surprise where someone's site stops working when they upgrade?
can you pull sass out as a top level dep explicitly inside the package.json somewhere? then if people want to they can just delete it from that?
@sintaxi can we upgrade terraform
for now so it pulls in the latest node-sass
? I think that will fix the node 6 problem.
Also having this problem right now.
@filipesilva I just published a preview for this fix it can be installed via npm install harp@next
. If you can, please let me know if it has the same issues.
@sintaxi our CI seems to happy with it on node 6, cheers!
@sintaxi we seem to be having issue with that version now though - our JS files aren't being copied over on compile. This seems due to changes in https://github.com/sintaxi/harp/pull/526/files. Is it intended?
Edit: Serving doesn't seem to have this issue though.
I added a naive fix that seems to restore the previous behaviour: https://github.com/sintaxi/harp/pull/579
I'm still getting this error a few months later.
Is there any better workaround for the libsass poison pill than the one we suggested above (whihc is just a one-time hack)?
Otherwise it seems the harp project is just unusable in its present state, and since that hasn't changed for six months, unmaintained and unlikely to change in future.
[~/dev/rikai/rikai.co/harp-site]$ npm -v
3.10.3
[~/dev/rikai/rikai.co/harp-site]$ node -v
v6.5.0
but harp can't even give a version number with node 6.
[~/dev/rikai/rikai.co/harp-site]$ harp --version
(node:5049) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:5049) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
/usr/local/lib/node_modules/harp/node_modules/terraform/node_modules/node-sass/lib/extensions.js:158
throw new Error([
^
Error: The `libsass` binding was not found in /usr/local/lib/node_modules/harp/node_modules/terraform/node_modules/node-sass/vendor/darwin-x64-48/binding.node
This usually happens because your node version has changed.
Run `npm rebuild node-sass` to build the binding for your current node version.
at Object.sass.getBinaryPath (/usr/local/lib/node_modules/harp/node_modules/terraform/node_modules/node-sass/lib/extensions.js:158:11)
at Object.<anonymous> (/usr/local/lib/node_modules/harp/node_modules/terraform/node_modules/node-sass/lib/index.js:16:36)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/harp/node_modules/terraform/lib/stylesheet/processors/scss.js:1:74)
Which harp version are you using?
latest
[~/dev/rikai/rikai.co/harp-site]$ npm list -g | grep harp
├─┬ harp@0.21.0
│ ├─┬ harp-minify@0.4.0
this is with node 6.5 if i downgrade to node5 things seem to work.
what is the entire graph below harp?
We use harp with node.6 with no issues. Tried running your repro on local harp and these were the results:
kamik@T460p MINGW64 /D/work/angular.io (master)
$ npm -v
3.10.3
kamik@T460p MINGW64 /D/work/angular.io (master)
$ node -v
v6.5.0
kamik@T460p MINGW64 /D/work/angular.io (master)
$ ./node_modules/.bin/harp --version
0.21.0
I know it's an unsatisfying answer, but have you tried uninstalling and reinstalling global harp? You might have some broken packages (like libsass) that weren't rebuilt on a update.
still getting this error a year later
I deeply regret using harp all because of this ass dependency
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
c++ '-DNODE_GYP_MODULE_NAME=binding' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/dc/.node-gyp/7.9.0/include/node -I/Users/dc/.node-gyp/7.9.0/src -I/Users/dc/.node-gyp/7.9.0/deps/uv/include -I/Users/dc/.node-gyp/7.9.0/deps/v8/include -I../../nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -stdlib=libc++ -fno-rtti -fno-exceptions -fno-threadsafe-statics -std=c++11 -MMD -MF ./Release/.deps/Release/obj.target/binding/src/binding.o.d.raw -c -o Release/obj.target/binding/src/binding.o ../src/binding.cpp
In file included from ../src/binding.cpp:3:
../src/sass_context_wrapper.h:8:10: fatal error: 'sass/context.h' file not found
#include <sass/context.h>
^
1 error generated.
make: *** [Release/obj.target/binding/src/binding.o] Error 1
libsass. the current version included somewhere in harp seems to be an old version which doesn't work with node 6.x
Since I'm not using sass in my project, is there a way of removing this as a dependency?
scss seems to always cause pain on every project, those native bindings... if you need to make something a hard dep, choose stylus please!
related:
https://github.com/sass/node-sass/issues/1612#issuecomment-228993387 https://github.com/sass/node-sass/issues/1629