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

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

Closed
mshibanami opened this issue Dec 1, 2018 · 5 comments · Fixed by #1379
Closed

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

mshibanami opened this issue Dec 1, 2018 · 5 comments · Fixed by #1379

Comments

@mshibanami
Copy link

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

@denisdefreyne
Copy link
Member

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

@denisdefreyne
Copy link
Member

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.

@denisdefreyne
Copy link
Member

I will soon release this fix in 4.10.4.

@denisdefreyne
Copy link
Member

Released in 4.10.4!

@mshibanami
Copy link
Author

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

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

Successfully merging a pull request may close this issue.

2 participants