Question

I have a really simply LESS file which for now just imports Bootstrap. I'm using grunt and grunt-contrib-less@0.9.0 to compile the LESS files on save (less@1.6.3).

My file looks like this:

@charset "utf-8";
/**
 * This is the root style file for the app
 * to include styles in your html, you only need to include either:
 *  dist/styles.dev.css (for development)
 *  dist/styles.css (for production)
 */

// Libraries
@import "../lib/bootstrap/less/bootstrap"

// Our own files

and I'm getting the following error whenever I try to run my less:dev task.

Running "less:dev" (less) task
>> ParseError: Unrecognised input in style/styles.less on line 10, column 1:
>> 9 // Libraries
>> 10 @import "../lib/bootstrap/less/bootstrap"
>> 11

I've tried removing everything from the file except the import line and it still fails, so something weird is going on with the @import directive.

Any ideas?

Was it helpful?

Solution

Use semi-colon after @import

@import "../lib/bootstrap/less/bootstrap";
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top