-
Notifications
You must be signed in to change notification settings - Fork 1.3k
io.js 1.1 support #627
Comments
Please read the comment on the original issue: nodejs/node#373 (comment), we are currently supporting latest stable version of node.js only. io.js runtime support is not on our immediate TODO list. |
On #563 (comment) I've hinted at the code changes needed to help make io.js work incase anybody has a chance to put together a PR. (I won't have time today for sure, although if pinged I can pass along more details on my local diff -- which wouldn't yet work for 0.10 users.) |
Just to be clear: with #630, it is possible to build the binary against io.js runtime. The one that I am not sure if the binary built by one version of a runtime should work seamlessly on any other runtime-version. Or are we expected to make a separate set of binaries for io.js? For latter, it will not be available with v2. Meanwhile, you would need to rebuild the binary manually for io.js. Similarly, even the binary that is built with node v0.10.35 (stable), does not work with v0.11.14 (nightly). Again, you would need to rebuild it manually. Note that this is a separate issue than making the Linux binaries cross-distro compatible: #602 and #517. Compatibility is a biggest challenge for us, as our upstream libsass is using C99 and C++11 STL features, our users and downstreams require it to work on old CentOS 5.5+ with newer libc & older libstdc++ (compared to debian counterparts) and the minimum gcc & g++ compiler version required to compile our binding is v4.6. Now you know how io.js would make the binary building and distribution process more complicated, especially for node-sass. |
A module must be rebuilt whenever |
iojs support has been merged for days, but the version hasn't been bumped yet. Can we please release to |
I must have misunderstood. I thought adding iojs binaries to the npm module what @browniefed was doing. So to use this in iojs, would you just need to follow these steps? |
Pretty much the same. Note that the official node-gyp package is yet to receive iojs love: nodejs/node-gyp#564. Meanwhile, we can use the one that is bundled with iojs as @mnutt mentioned here. Sometime ago, we were thinking about expanding the platforms support in terms of binaries (FreeBSD, Solaris). But support for ioj.s and kind is certainly another important dimension. The show stopper at the moment is compatibility for Linux binaries. If we release without caring about older versions of linux platform, it will make masses unhappy (that is why I don't want to rush but rather work out the permanent solution this time for this recurring problem). Therefore, it is quite hard to say when v2.0.0 will be released and this expansion plan will move forward. |
A bit confused... That's my output trying to build node-sass ( after cloning the repo, etc ) ➜ node-sass git:(master) node --version && npm --version && node-gyp --version
v1.0.4
2.3.0
v1.0.2
➜ node-sass git:(master) sudo node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@1.0.2
gyp info using node@1.0.4 | darwin | x64
child_process: customFds option is deprecated, use stdio instead.
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/antouank/_REPOS_/test/client/node_modules/grunt-sass/node_modules/node-sass/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/antouank/.node-gyp/1.0.4/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/antouank/.node-gyp/1.0.4',
gyp info spawn args '-Dmodule_root_dir=/Users/antouank/_REPOS_/test/client/node_modules/grunt-sass/node_modules/node-sass',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/binding/src/binding.o
In file included from ../src/binding.cpp:1:
../node_modules/nan/nan.h:1848:10: error: no matching function for call to 'Encode'
return node::Encode(
^~~~~~~~~~~~
/Users/antouank/.node-gyp/1.0.4/src/node.h:251:34: note: candidate function not viable: cannot convert argument of incomplete type 'const void *' to 'const char *'
NODE_EXTERN v8::Local<v8::Value> Encode(v8::Isolate* isolate,
^
/Users/antouank/.node-gyp/1.0.4/src/node.h:257:34: note: candidate function not viable: requires 3 arguments, but 4 were provided
NODE_EXTERN v8::Local<v8::Value> Encode(v8::Isolate* isolate,
^
/Users/antouank/.node-gyp/1.0.4/src/node.h:262:45: note: candidate function not viable: requires at most 3 arguments, but 4 were provided
inline v8::Local<v8::Value> Encode(
^
/Users/antouank/.node-gyp/1.0.4/src/node.h:43:53: note: expanded from macro 'NODE_DEPRECATED'
#define NODE_DEPRECATED(msg, fn) V8_DEPRECATED(msg, fn)
^
/Users/antouank/.node-gyp/1.0.4/deps/v8/include/v8config.h:332:45: note: expanded from macro 'V8_DEPRECATED'
# define V8_DEPRECATED(message, declarator) declarator
^
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/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:101:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1038:12)
gyp ERR! System Darwin 14.0.0
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/antouank/_REPOS_/test/client/node_modules/grunt-sass/node_modules/node-sass
gyp ERR! node -v v1.0.4
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
➜ node-sass git:(master) |
@xzyfer, great thanks! Also http://www.appveyor.com/docs/lang/nodejs-iojs. We will definitely incorporate io.js in our CI matrices. :) @AntouanK @kkoopa, here is the first error: C:\Users\adeel\Source\Repos\node-sass\node_modules\nan\nan.h(1851):
error C2665: 'node::Encode' : none of the 3 overloads could convert all the
argument types (..\src\binding.cpp) [C:\Users\adeel\Source\Repos\node-sass
\build\binding.vcxproj] Full log: https://gist.github.com/am11/68a2022bbe49b193dcd0. I am using pangyp. Following are the steps to reproduce the bug: git clone https://github.com/sass/node-sass --recursive; cd node-sass
git submodule update --recursive --init
npm install; npm install pangyp
iojs node_modules/pangyp/bin/node-gyp rebuild
# here the following command succeeds:
# node node_modules/pangyp/bin/node-gyp rebuild Is it a known bug or am I doing it wrong? :) |
@am11 Sorry, my english might not be that good. After updating the dependencies, are you able to reproduce the errors I have or not? |
@am11 Ok. Let us know if you want to use any other log from the error. |
@kkoopa, tested on windows and it worked. Had to make this change: # this is powershell
git clone https://github.com/sass/node-sass --recursive ; cd node-sass
git submodule --recursive --init
# update nan to v1.6.2 in package.json
npm install
npm install pangyp
iojs node_modules/pangyp/bin/node-gyp configure
## >>>> START_HACK <<<< ##
notepad build/binding.vcxproj
# Ctrl+H and replace node.lib to iojs.lib
# save and close
# open build/binding.sln in VS change configuration to Release and Ctrl+Shift+B to build
# close VS
## >>>> END_HACK <<<< ##
iojs
# this is iojs interactive console
> require('./').render({data: 'aside{margin: nolla}'})
# returns:
{ stats:
{ entry: 'data',
start: 1423260352409,
includedFiles: [],
end: 1423260352409,
duration: 3 },
css: 'aside {\n margin: nolla; }\n',
sourceMap: '{}' }
> Would be nice if we don't have to apply that hack, that is; we don't have to change vcxproj file and we don't have to open VS to build.. :) |
It's a bug in pangyp |
nod-sass has same problem on |
@am11 Awesome did get that to work now. But how can I install it as |
@Globegitter, the upcoming node-sass v2.0.0 (stable) will support the present production-ready node.js version 0.12. Note that here support means the binaries available through dist. Otherwise you can manually build it with other versions of node.js et al. Related: #653. |
@am11 Thanks. It is strange, so I have gotten the latest master to work in a fresh project, but if I reproduce the steps in an existing project I do not seem to be able to get it to work. So all builds fine, but then when I start my server I get the following error: dlopen(client/node_modules/broccoli-sass/node_modules/node-sass/vendor/darwin-x64/binding.node, 1): Symbol not found: __ZTVN4Sass6CssizeE
Referenced from: client/node_modules/broccoli-sass/node_modules/node-sass/vendor/darwin-x64/binding.node
Expected in: flat namespace
in client/node_modules/broccoli-sass/node_modules/node-sass/vendor/darwin-x64/binding.node
Error: dlopen(client/node_modules/broccoli-sass/node_modules/node-sass/vendor/darwin-x64/binding.node, 1): Symbol not found: __ZTVN4Sass6CssizeE
Referenced from: client/node_modules/broccoli-sass/node_modules/node-sass/vendor/darwin-x64/binding.node
Expected in: flat namespace
in client/node_modules/broccoli-sass/node_modules/node-sass/vendor/darwin-x64/binding.node
at Error (native)
at Module.load (module.js:341:32)
at Function.Module._load (module.js:296:12)
at Module.require (module.js:351:17)
at require (module.js:370:17)
at Object.<anonymous> (/client/node_modules/broccoli-sass/node_modules/node-sass/lib/index.js:192:15)
at Module._compile (module.js:446:26)
at Object.Module._extensions..js (module.js:464:10)
at Module.load (module.js:341:32)
at Function.Module._load (module.js:296:12) Any idea what this might be about? Edit: Weird, I just seemed to have rebuilt and it works fine. That is awesome! Can confirm now that I got node-sass to work in one of my projects using iojs. Just keeping the above error for reference, since I still do not know why it appeared and what actually fixed that. |
@Globegitter, thanks for confirming that the This feature request is completed. node-sass is compatible with |
Hey guys. node-sass v2.0.0 (superseded by patch release v2.0.1) is released with io.js v1.2 support. See the release notes and the binary coverage matrix in node-sass-binaries release notes. |
now it broke on iojs 1.3... :-/ |
Libraries with native extension like libsass need to be compiled against Technically it's not broken in 1.3 because 1.3 was never supported. If you For now downgrading to 1.2 or using nvm to run 1.2 in parallel will work.
|
Hmm this will be a major chore in io's case as it seems to be releasing a new version every week.... I did downgrade for now and it works. |
I agree. I've opened a new issue to address the rapid release cycle of
|
Just to have the cross-link: #694 |
Fix the hanging } in some at-rules nested output
Presently, trying to run
sass-loader
against the latestnode-sass@2.0.0-beta
(the latest in npm) onio.js@1.0.1
appears to succeed, but upon execution yields aModule did not self-register
error. If you follow the advice of #563 and remove the binding altogether, you'll get this instead:The text was updated successfully, but these errors were encountered: