Program Tip

"나침반 시계"에서 sass / script / node를로드 할 수 없다고 말하는 이유는 무엇입니까 (LoadError)?

programtip 2020. 10. 31. 10:02
반응형

"나침반 시계"에서 sass / script / node를로드 할 수 없다고 말하는 이유는 무엇입니까 (LoadError)?


나침반 시계 명령에 문제가 있습니다. 며칠 전까지 만해도 정상적으로 작동했습니다. 구성 파일을 변경하지 않았습니다.

Compass를 다시 설치하고 rvm을 사용하여 Ruby를 업데이트했습니다. custom_require.rb 파일을 확인했지만 무엇을 찾아야할지 모르겠습니다. 어딘가에 "sass / script / node"파일을로드하려고 시도하는 것 같습니다. 파일 http://sass-lang.com/docs/yardoc/Sass/Script/Node.html경로를 수집합니다.하지만 거기에는 아무것도 없습니다.

/Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require': cannot load such file -- sass/script/node (LoadError)
  from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
  from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
  from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches/browser_support.rb:1:in `<top (required)>'
  from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
  from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
  from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:2:in `block in <top (required)>'
  from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `each'
  from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `<top (required)>'
  from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
  from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
  from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions.rb:9:in `<top (required)>'
  from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
  from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
  from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass.rb:5:in `block in <top (required)>'
  from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass.rb:4:in `each'
  from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass.rb:4:in `<top (required)>'
  from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
  from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
  from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/bin/compass:20:in `block in <top (required)>'
  from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/bin/compass:8:in `fallback_load_path'
  from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/bin/compass:19:in `<top (required)>'
  from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/bin/compass:19:in `load'
  from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/bin/compass:19:in `<main>'
  from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
  from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'

누구나 아이디어가 있습니까?


sass를 제거하고 다음을 사용하여 다시 설치하십시오.

gem uninstall sass
gem install sass

sass 설치에 문제가 있었고 이렇게하면 문제가 해결되었습니다.


제 경우에는 Sass 버전이 Compass와 호환되지 않았습니다.

수정 :

  1. Sass 및 Compass 제거

    gem uninstall compass
    gem uninstall sass
    
  2. 호환되는 Sass 엔진을 자동으로 설치할 Compass 설치

    gem install compass
    

이 조합은 마침내 Compass와 SASS Sourcemap을 함께 가져 오는 데 도움이됩니다.

Gemfile

gem 'sass', '3.3.0.alpha.149'
gem 'compass', '0.12.2'
gem 'compass-sourcemaps', "~> 0.12.2.sourcemaps.57a186c"

나침반 config.rb

sass_options = {:sourcemap => true}

이 특정 버전은 다음 두 가지 모두에서 잘 작동합니다.

gem 'sass', '3.3.0.alpha.149'
gem 'compass', '0.12.2'

서로 호환되지 않을 수 있으므로 이러한 오류가 발생합니다 (블리딩 엣지 버전을 사용하고 있음을 고려).


Ubuntu를 사용하는 경우 apt-get 및 rvm 충돌에 문제가있을 수 있습니다.

rvm을 제거한 rvm implode다음 실행하십시오.

sudo apt-get install ruby-compass 

compass watch 그 후 나를 위해 일했습니다.


위의 답변에 대한 변형 : 저에게 (Sass 용 Bootstrap 사용)

gem install bootstrap-sass

이 문제를 해결하기 위해 필요했습니다. 나에게 Compass의 LoadError 문제는 내가 사용하고있는 Ruby 버전을 업데이트 한 후에 시작되었습니다.


나는 이것이 sass와의 버전 관리 충돌 때문이라고 생각합니다.

https://rubygems.org/gems/compass gem is currently at v0.12.16 currently - add this to Gemfile

gem 'sass', '3.2.19'
gem 'compass', '0.12.6'

You may be required to uninstall all versions of both gems first.


I was able to fix it by doing this

gem uninstall sass
gem install sass -v 3.2.12

This is definitely due to a version dependency issue, you are better off fixing your grunt task to make it forward compatible with the newer versions of saas, compass and so on.


I had the same problem and then I realised that I had two compass versions, so by doing:

compass watch or compass compile

The compiler didn't know which compass version it should use to compile. So, what you can do is explicitly indicate the compass version to work with:

compass _1.0.3_ watch

There's another interesting thread.


The following combinations worked for me:

gem install compass --pre
gem install sass -v 3.3.3

I had to setup a gemfile with the correct versions (this error is caused by mismatched SASS and Compass versions, for me). I used thew following with bundle install to fix the problem:

source "https://rubygems.org"

gem 'bootstrap-sass', "~> 3.2.0"
gem 'sass', [ "< 3.5" , ">= 3.3.13" ]
gem 'compass', "~> 1.0.1"
gem 'compass-core', "~> 1.0.1"
gem 'compass-import-once', "~> 1.0.5"
gem 'chunky_png', "~> 1.2"
gem 'rb-fsevent', ">= 0.9.3"
gem 'rb-inotify', ">= 0.9"

참고URL : https://stackoverflow.com/questions/16877028/why-does-compass-watch-say-it-cannot-load-sass-script-node-loaderror

반응형