Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harp broken in Node 5/npm 3 #510

Closed
omichelsen opened this issue Nov 5, 2015 · 16 comments
Closed

Harp broken in Node 5/npm 3 #510

omichelsen opened this issue Nov 5, 2015 · 16 comments

Comments

@omichelsen
Copy link

My harp installation stopped working after upgrade to Node 5 with the following message:

Error: The `libsass` binding was not found in /usr/local/lib/node_modules/harp/node_modules/terraform/node_modules/node-sass/vendor/darwin-x64-47/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.

The rebuild command did nothing, so I tried reinstalling Harp, which led to this epic fail:

gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
  c++ '-DNODE_GYP_MODULE_NAME=binding' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/olem/.node-gyp/5.0.0/include/node -I/Users/olem/.node-gyp/5.0.0/src -I/Users/olem/.node-gyp/5.0.0/deps/uv/include -I/Users/olem/.node-gyp/5.0.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 -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
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/harp/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.0.0
gyp ERR! command "/usr/local/Cellar/node/5.0.0/bin/node" "/usr/local/lib/node_modules/harp/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /usr/local/lib/node_modules/harp/node_modules/node-sass
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
Build failed
npm WARN install:node-sass@3.3.3 node-sass@3.3.3 postinstall: `node scripts/build.js`
npm WARN install:node-sass@3.3.3 Exit status 1

No variation of sudo or simliar will make it work. It's obviously caused by something in node-sass (again), but do you have any insights into an upcoming fix?

@ir-g
Copy link

ir-g commented Nov 5, 2015

@omichelsen The problem appears to be from those logs specifically caused by the NPM package node-sass. I have had similar issues, when trying to harp or harp-dependent applications, including on windows(alexgleason/harp-gui#22).

Some support may be available at github.com/sass/node-sass/blob/master/TROUBLESHOOTING.md, though if you continue to have these errors, try seeing if node-sass on its own will work.

If node-sass wont work when you try installing and running it, then you may well wish to raise an issue here.

@omichelsen
Copy link
Author

Thanks for the suggestions, but npm install -g node-sass works fine. It's only when installing Harp things go awry.

@ir-g
Copy link

ir-g commented Nov 5, 2015

@sintaxi may well need a look at this, then

@james89
Copy link

james89 commented Nov 5, 2015

@isaacrg Experiencing @omichelsen's error as well! Thanks

@james89
Copy link

james89 commented Nov 5, 2015

@omichelsen If you're using homebrew, switching global node version back to v4.2.2 allowed me to install harp correctly

@silentrob
Copy link
Collaborator

Harp support is tied pretty closly with node-sass. I suspect when node-sass works on npm 3/node 5 harp will get bumped too. For the time being go back to node 4 and re-install. Hopefully you are using nvm and that is an easy task.

@robclancy
Copy link

@silentrob Considering node-sass installs just fine I don't see how it can be the issue.

@ir-g
Copy link

ir-g commented Nov 6, 2015

Harp might not be using the latest node-sass version, which could be the
difference.

On Fri, 6 Nov 2015 00:11 Robert Clancy (Robbo) notifications@github.com
wrote:

@silentrob https://github.com/silentrob Considering node-sass installs
just fine I don't see how it can be the issue.


Reply to this email directly or view it on GitHub
#510 (comment).

@ir-g
Copy link

ir-g commented Nov 6, 2015

I can confirm that heroku is running Node V5.0.0, and when I tried loading an app dependent on the latest version of harp on (0.19.0), node-sass wouldn't install.
Log at: http://pastebin.com/hDByf4yQ

@kennethormandy
Copy link
Collaborator

This will be fixed in the next release of Harp. If you need to get around it in the meantime, I’ve updated Terraform, Harp’s preprocessing engine, with the latest release of Node-sass. So, you can install that manually in the meantime if you’d like. In your project directory, you can run:

npm install --save-dev harp terraform@0.13.1

Or use npm shinkwrap and set your own versions. We’ll have a new release out soon with this updated properly, though. Thanks for your patience! #502

@ir-g
Copy link

ir-g commented Nov 7, 2015

Thanks!

On Fri, 6 Nov 2015 23:03 Kenneth Ormandy notifications@github.com wrote:

This will be fixed in the next release of Harp. If you need to get around
it in the meantime, I’ve updated Terraform, Harp’s preprocessing engine,
with the latest release of Node-sass. So, you can install that manually in
the meantime if you’d like. In your project directory, you can run:

npm install --save-dev harp terraform@0.13.1

Or use npm shinkwrap https://docs.npmjs.com/cli/shrinkwrap and set your
own versions. We’ll have a new release out soon with this updated properly,
though. Thanks for your patience! #502
#502


Reply to this email directly or view it on GitHub
#510 (comment).

@IngwiePhoenix
Copy link

Yup, broken here too. C++ errors arise during the build, reflecting the major native API changes, most of them being breaking ones.

Harp should be updated to reflect these changes too, imho. :)

@saper
Copy link

saper commented Nov 10, 2015

@fustkilas Try ./node_modules/.bin/harp

@ghost
Copy link

ghost commented Nov 10, 2015

I ended up using https://github.com/tj/n and node 4.0.0, awaiting latest harp.

This was referenced Nov 12, 2015
lunelson added a commit to lunelson/harp that referenced this issue Jan 5, 2016
* 'master' of github.com:sintaxi/harp:
  version bump v0.20.1
  adds projectPath to the callback context. Closes sintaxi#506
  Updates Terraform, adds Node v5.x support and fixes sintaxi#510
  Updates CI targets
  Updates Terraform, Node v5.x compatibility
  Updates engines
  fix content-length calculating
  Adds CI config files
  Updates Terraform to v0.13.0
  Version bump v0.20.0

# Conflicts:
#	package.json
@aviris
Copy link

aviris commented Sep 14, 2016

Deleted all node and npm traces from my system, reinstalled Node/npm 6.5.0/3.10.3 with Homebrew, then npm install -g harp@next

Works perfectly!

@adeonir
Copy link

adeonir commented Sep 30, 2016

Here I did not have to uninstall node/npm, only installed using harp@next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants