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

@import cannot find include-media.scss in node_modules folder #2377

Closed
ASauer opened this issue May 14, 2017 · 1 comment
Closed

@import cannot find include-media.scss in node_modules folder #2377

ASauer opened this issue May 14, 2017 · 1 comment

Comments

@ASauer
Copy link

ASauer commented May 14, 2017

Problem:

  1. I have installed include-media.scss
    [(http://include-media.com/)]

  2. In Gruntfile.js I added
    includePaths: [path.join(__dirname, 'node-modules', 'include-media', 'dist')]
    to the sass options
    (I've added the complete Gruntfile, which is small, I think).
    Gruntfile.js.zip

  3. I use @import 'include-media'; in an scss-file to import the partial named: _include-media.scss

  4. When I try to @import this mixin library I get the following warning message in the Command Line:

Warning: 
>> Error: File to import not found or unreadable: include-media.
>>        Parent style sheet: /Volumes/Project/Website/SauerMusic/htdocs/assets/sass/_variables.scss
>>         on line 3 of assets/sass/_variables.scss
>> >> @import 'include-media';
>>    ^
  1. Running grunt --verbose in the command line I can see the path to _include-media.scss, namely:
    includePaths=["/Volumes/Project/Website/SauerMusic/htdocs/node-modules/include-media/dist"]

  2. It looks like the path can be found (I say, looks like, but, read on).

  3. If I copy the file _include-media.scss to the directory where my scss files 'live', @import works, and the mixin works.

  4. I think this leads to the conclusion that there is a bug:

  • grunt --verbose shows the path to the file, so the part of the warning that states that the file cannot be found does not seem to apply.
  • copying the file to my normal scss-files directory shows that the file is readable, so that part of the warning message also does not apply.
    This leads to the conclusion that either:
  • the error message does not state the problem correctly;
  • there is a bug somewhere.

=====================================================================

  • Read the common workarounds in the TROUBLESHOOTING.md
    node -v: v6.10.3 (io.js according to the workarounds guide, though I read in wikipedia that there is no difference anymore…)

npm -v: 4.5.0 (in a clean workspace)
node -v: v6.10.3
node -p process.versions
{ http_parser: '2.7.0',
node: '6.10.3',
v8: '5.1.281.101',
uv: '1.9.1',
zlib: '1.2.11',
ares: '1.10.1-DEV',
icu: '58.2',
modules: '48',
openssl: '1.0.2k' }
node -p process.platform: darwin
node -p process.arch: x64
npm ls node-sass
/Users/arthursauer/temp1
└── node-sass@4.5.2
node -p "require('node-sass').info"
node-sass 4.5.2 (Wrapper) [JavaScript]
libsass 3.5.0.beta.2 (Sass Compiler) [C/C++]

  • Search for duplicate or closed issues
    Issue Use the correct parsing semantics for url-prefix() #1596 looks related to my issue, but I don’t use @Scoped (and I don’t know what that is, and I could not find it in the ‘new’ list of issues).

  • Validate that it runs with both Ruby Sass and LibSass
    There’s not much to test since the problem is an @import.

  • Prepare a reduced test case for any bugs
    I did.

  • Read the contributing guidelines
    I did.

  • NPM version (npm -v): 4.5.0

  • Node version (node -v): v6.10.3

  • Node Process (node -p process.versions):
    { http_parser: '2.7.0',
    node: '6.10.3',
    v8: '5.1.281.101',
    uv: '1.9.1',
    zlib: '1.2.11',
    ares: '1.10.1-DEV',
    icu: '58.2',
    modules: '48',
    openssl: '1.0.2k' }

  • Node Platform (node -p process.platform): darwin

  • Node architecture (node -p process.arch): x64

  • node-sass version (node -p "require('node-sass').info"):
    node-sass 4.5.2 (Wrapper) [JavaScript]
    libsass 3.5.0.beta.2 (Sass Compiler) [C/C++]

  • npm node-sass versions (npm ls node-sass):
    └─┬ grunt-sass@2.0.0
    └── node-sass@4.5.2

@xzyfer
Copy link
Contributor

xzyfer commented May 17, 2017

Should node-modules be node_modules?
I'm certain this is a grunt configuration issue and not a libsass issue. Unfortunately we cannot offer grunt support.

@xzyfer xzyfer closed this as completed May 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants