knksmith57 / hexo-renderer-sass

Sass renderer plugin for Hexo
45 stars 45 forks source link

File to import not found or unreadable: ./node_modules/ #39

Open jonathanlinat opened 6 years ago

jonathanlinat commented 6 years ago

Hi @JLHwung and @knksmith57,

This is my project files/folders structure:

myproject/
  themes/
    mytheme/
      .node_modules/
      source/
        css/
          mytheme.sass
      _config.yml
      package.json

So, I modified my myproject/themes/mytheme/source/css/mytheme.sass file in order to import two _nodemodules/ packages:

@import "./node_modules/minireset.css/minireset.sass"
@import "./node_modules/components-font-awesome/scss/font-awesome"

But when I execute hexo server and I navigate through my localhost server, I got this error message in Terminal:

Error: File to import not found or unreadable: ./node_modules/minireset.css/minireset.sass.
Error: File to import not found or unreadable: ./node_modules/components-font-awesome/scss/font-awesome.

So, how should I import these packages into my main SASS file?

Regards.

JLHwung commented 6 years ago

Please see https://github.com/knksmith57/hexo-renderer-sass/pull/38#issuecomment-346514890