question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot compile imports - Error in plugin 'sass'

See original GitHub issue

Software:

  • Node: v4.2.6 (x64)
  • npm: latest, I think, I downloaded it today ^^
  • Gulp: 3.9.0
  • gulp-sass: 2.2.0
  • OS: Windows 7
  • IDE: Visual Studio 2015 (Web Essentials 2015)

It compiles properly when I have basic sass like this: https://i.gyazo.com/e5f30a66e6cfe23466d3416fab7805a9.png

But when I try to compile with the partials imported I get an error: https://i.gyazo.com/d5fdc3e2ffc0df588ecd7586c479463e.png

Starting 'sass-compile'...
Error in plugin 'sass'
Message: 
    Content/Styles/application.scss
undefined
Finished 'sass-compile' 
Process terminated with code 0.

I’ve tried importing just one of the partials, with very clean, basic sass inside, and everything, but I still get the error.

I’m very new to node and task managers. I probably haven’t given you enough of information, please tell me what you need to know! I hope you do not hate me because I’m just providing you with images - but I am not at the office right now and I can’t get this problem out of my mind. Sorry!

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7

github_iconTop GitHub Comments

4reactions
xzyfercommented, Feb 9, 2016

There is a known issue with LibSass and directories with Cyrillic characters. This may also apply to other non-ascii characters. Please try the gulp-sass beta for the patch.

npm install gulp-sass@beta
0reactions
KrunalDatasciencecommented, Nov 12, 2018

Hey, I am getting same error when i am trying to customize an online open source template. After extracting the .zip file from above location I am running following sets of command in command prompt. Note - node.js is already installed in my system.

npm install -g gulp //installing gulp globally
npm init //initialization 
npm install --save-dev gulp //installing gulp locally - dev utility

npm install -g npm-install-all 
npm-install-all gulpfile.js //Installing all required modules from gulpfile.js 

After preparing my env. when i run the gulp task defined in the gulpfile.js using following code, it throws the mentioned error:

C:\Users\my_user\Documents\my_project>gulp build
[18:42:36] Using gulpfile ~\Documents\my_project\gulpfile.js
[18:42:36] Starting 'build'...
[18:42:36] Starting 'clean:dist'...
[18:42:36] Finished 'clean:dist' after 4.27 ms
[18:42:36] Starting 'scss'...
Error in plugin 'sass'
Message:
    assets\scss\custom\_mixins.scss
Error: File to import not found or unreadable: custom/mixins/alert.scss.
        on line 1 of assets/scss/custom/_mixins.scss
        from line 28 of assets/scss/argon.scss
>> @import "custom/mixins/alert.scss";

   ^

[18:42:37] Finished 'scss' after 805 ms
[18:42:37] Starting 'copy:css'...
[18:42:37] Finished 'copy:css' after 33 ms
[18:42:37] Starting 'copy:js'...
[18:42:37] Finished 'copy:js' after 11 ms
[18:42:37] Starting 'minify:js'...
[18:42:37] Finished 'minify:js' after 128 ms
[18:42:37] Starting 'minify:css'...
[18:42:38] Finished 'minify:css' after 992 ms
[18:42:38] Finished 'build' after 2 s

The content of all the file is unchanged and is the same as the git repo. So, incase if one wants to refer, one can check the link attached earlier.

I am using a windows-10 machine with:

>npm -v
6.4.1

>node -v
v8.12.0

>gulp -v
[19:04:01] CLI version 3.9.1
[19:04:01] Local version 3.9.1
Read more comments on GitHub >

github_iconTop Results From Across the Web

Gulp-sass 5.0 how to use compiler with import() instead of ...
But im using import() instead of require() and i can't find out how to translate the code they provided with require() to import()...
Read more >
Features | Vite
Rewrite the imports to valid URLs like /node_modules/.vite/deps/my-dep.js?v=f3sf2ebd so that the browser can import them properly. Dependencies are Strongly ...
Read more >
rollup-plugin-scss - npm
rollup.config.js import scss from 'rollup-plugin-scss' export default ... Options are passed to the sass compiler (node-sass by default).
Read more >
Common Error Details - Snowpack
If you are using TypeScript, this error could occur if you are importing or exporting something that only exists in TypeScript (like a...
Read more >
Sass: @import
As a convention, Sass files that are only meant to be imported, not compiled on their own, begin with _ (as in _code.scss...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found