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

Error: Unrecognised input in file ... #1864

Closed
lukedanielson opened this issue Jan 19, 2017 · 3 comments
Closed

Error: Unrecognised input in file ... #1864

lukedanielson opened this issue Jan 19, 2017 · 3 comments

Comments

@lukedanielson
Copy link

Have looked on gulp-sass, node-sass, and LibSass for this issue for about an hour, but haven't found anything pertinent, so I am opening here.

I had a permissions issue with the node_modules folder, so I ran rm -Rf node_modules followed by an npm install.

For some reason, now, when I try to run my styles task, I get:

Starting 'styles'...
Unrecognised input in file /path/to/assets/styles/common/_variables.scss line no. 2

Line 2 of that file is: $brandColors: ( as it is the start of a simple sass map

If I comment out the @import of that particular file, it just throws an error on the next imported file, such as:

// common/_global.scss
$gray-lightest: lighten($gray-lighter, 4%);

// this throws the error:
//  Unrecognised input in file /path/to/assets/styles/common/_global.scss line no. 1

For the life of me, I can't figure out what is causing the issue. Any references or places to point me to solve this would be greatly appreciated. Apologies If I posted this to the wrong place.

Output of my environment versions/config here:

$ npm -v
3.8.0

$ node -v
v7.4.0

$ node -p process.versions
{ http_parser: '2.7.0',
  node: '7.4.0',
  v8: '5.4.500.45',
  uv: '1.10.1',
  zlib: '1.2.8',
  ares: '1.10.1-DEV',
  modules: '51',
  openssl: '1.0.2j',
  icu: '58.2',
  unicode: '9.0',
  cldr: '30.0.3',
  tz: '2016j' }

$ node -p process.platform
darwin

$ node -p process.arch
x64

$ node -p "require('node-sass').info"
node-sass	3.13.1	(Wrapper)	[JavaScript]
libsass  	3.3.6	(Sass Compiler)	[C/C++]

$ npm ls node-sass
sage@8.4.2 /Users/luke/code/vagrant/ehyd-ubu-14.04-php7/www/ehyd/public/wp-content/themes/ehydrate
└─┬ gulp-sass@2.3.2
  └── node-sass@3.13.1 
@xzyfer
Copy link
Contributor

xzyfer commented Jan 19, 2017 via email

@lukedanielson
Copy link
Author

lukedanielson commented Jan 20, 2017

"bug with the line number in the error message"? Like I said, no matter which SCSS files are referenced in my main.scss, it seems to not be processing the sass syntax properly. My include paths, when it was working, was simply [.], but have tried adding all possibly related paths into the array, but to no avail.

And randomly, sometimes the error seems to relate to not finding a .less file when is should be looking for a .scss file:

'bootstrap/responsive-utilities.less' wasn't found. Tried - /[project-path]/bower_components/bootstrap-sass-official/assets/stylesheets/bootstrap/responsive-utilities.less,bootstrap/responsive-utilities.less in file
  /[project-path]/bower_components/bootstrap-sass-official/assets/stylesheets/_bootstrap.scss line no. 50

Anyone come across this, where node/gulp/sass treats a third-party SASS file dependency as missing and looks for the .less equivalent?

Is this a file permissions or ownsership issue?

@lukedanielson
Copy link
Author

After further debugging, the issue seems to be which version of node is being used. Downgrading node back to v5.12.0, in either the Linux VM itself or through brew on the host, from v7.4.0 allowed gulp to process the sass without issue.

As you can probably tell, I'm not super knowledgeable as to the particulars of what the overall problem is, but it most likely has nothing to do with node-sass.

So I'll close this ; )

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