node.js - npm install less throws error from ruby -


i trying use less, following getting started guide

i ran sudo npm install -g less ended with:

/usr/bin/lessc -> /usr/lib/node_modules/less/bin/lessc less@1.7.0 /usr/lib/node_modules/less ├── mime@1.2.11 ├── mkdirp@0.3.5 ├── source-map@0.1.33 (amdefine@0.1.0) 

but when try using lessc error ruby:

$ lessc  /home/jasonshark/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:298:in `to_specs': not find 'less' (>= 0) among 153 total gem(s) (gem::loaderror)     /home/jasonshark/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:309:in `to_spec'     /home/jasonshark/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'     /home/jasonshark/.rvm/gems/ruby-2.0.0-p247/bin/lessc:22:in `<main>'     /home/jasonshark/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `eval'     /home/jasonshark/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `<main>' 

what's conflict , how fix it?

my $path variable is:

$ echo $path /home/jasonshark/.rvm/gems/ruby-2.0.0-p247/bin:/home/jasonshark/.rvm/gems/ruby-2.0.0-p247@global/bin:/home/jasonshark/.rvm/rubies/ruby-2.0.0-p247/bin:/home/jasonshark/.rvm/bin:/home/jasonshark/.rvm/bin:/home/jasonshark/code/adt-bundle-linux-x86-20131030/sdk/tools:/home/jasonshark/code/adt-bundle-linux-x86-20131030/sdk/platform-tools:/usr/local/heroku/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/jasonshark/.rvm/bin 

the ruby gem less in conflict npm module lessc. both gem , npm module contain executable lessc. since rvm appending ruby bin directories front of path, running ruby lessc command when intending run npm lessc command.

to fix, run /usr/bin/lessc. more explicit , avoid invoking ruby lessc.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -