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

Can't compile some scss files importing another scss from node_modules #1378

Closed
mshibanami opened this Issue Dec 1, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@mshibanami

mshibanami commented Dec 1, 2018

Some SCSS files aren't compiled with :sass filter anymore after #1365 was merged.

Steps to reproduce

Run this:

git clone https://github.com/mshibanami/website
cd website
git reset --hard a9fcc7d
npm install
bundle install
bundle exec nanoc

Expected behavior

All SCSS files are compiled without an error.

Actual behavior

Got this error when compiling content/assets/sass/revealjs-theme.scss:

Captain! We’ve been hit!

  ... 36 lines omitted (see crash.log for details)
  9. from /Users/manabu/workspace/website/vendor/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/stack.rb:115:in `with_frame'
  8. from /Users/manabu/workspace/website/vendor/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/stack.rb:79:in `block in with_base'
  7. from /Users/manabu/workspace/website/vendor/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/perform.rb:162:in `block in visit'
  6. from /Users/manabu/workspace/website/vendor/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/base.rb:36:in `visit'
  5. from /Users/manabu/workspace/website/vendor/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/perform.rb:314:in `visit_import'
  4. from /Users/manabu/workspace/website/vendor/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/import_node.rb:37:in `css_import?'
  3. from /Users/manabu/workspace/website/vendor/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/import_node.rb:28:in `imported_file'
  2. from /Users/manabu/workspace/website/vendor/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/import_node.rb:48:in `import'
  1. from /Users/manabu/workspace/website/vendor/bundle/ruby/2.5.0/gems/compass-import-once-1.0.5/lib/compass/import-once/importer.rb:7:in `find_relative'
  /Users/manabu/workspace/website/vendor/bundle/ruby/2.5.0/gems/nanoc-4.10.3/lib/nanoc/filters/sass/importer.rb:24:in `find_relative'

RuntimeError: unable to map /Users/manabu/workspace/website/node_modules/reveal.js/css/theme/template/mixins.scss to any item

Current item: /assets/sass/revealjs-theme.scss (:en representation)

A detailed crash log has been written to ./crash.log.

Details

This problem has been happening after updating the nanoc to 4.9.10.
I know it was caused by importing SCSS files in node_modules/reveal.js/css/theme/template/ with @import, but I couldn't find the solution due to the lack of my knowledge about the nanoc.

Crash log

https://travis-ci.org/mshibanami/website/jobs/461728327#L734

@ddfreyne

This comment has been minimized.

Member

ddfreyne commented Dec 1, 2018

I can confirm that this happens and am looking into it.

@ddfreyne

This comment has been minimized.

Member

ddfreyne commented Dec 1, 2018

There is a potential fix in #1379.

Importing files from outside Nanoc’s content/ directory will now work again, but note that Nanoc’s is only able to track changes to files inside the content/ directory.

@ddfreyne

This comment has been minimized.

Member

ddfreyne commented Dec 1, 2018

I will soon release this fix in 4.10.4.

@ddfreyne

This comment has been minimized.

Member

ddfreyne commented Dec 1, 2018

Released in 4.10.4!

@mshibanami

This comment has been minimized.

mshibanami commented Dec 1, 2018

I confirmed your incredibly fast fix works perfectly. Thanks @ddfreyne!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment