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.

`//` comments result in `Unknown word`

See original GitHub issue

If a file has a comment with //, the loader will fail with the error:

    Module build failed: CssSyntaxError: /Users/Greg1/projects/opensignal-toolchain/node_modules/scss-lint-loader/index.js!/Users/Greg1/projects/opensignal-toolchain/lib/css/index.scss:2:4: Unknown word
        at Input.error (/Users/Greg1/projects/opensignal-toolchain/node_modules/css-loader/node_modules/postcss/lib/input.js:61:21)
        at Parser.unknownDecl (/Users/Greg1/projects/opensignal-toolchain/node_modules/css-loader/node_modules/postcss/lib/parser.js:470:26)
        at Parser.decl (/Users/Greg1/projects/opensignal-toolchain/node_modules/css-loader/node_modules/postcss/lib/parser.js:227:22)
        at Parser.word (/Users/Greg1/projects/opensignal-toolchain/node_modules/css-loader/node_modules/postcss/lib/parser.js:135:30)
        at Parser.loop (/Users/Greg1/projects/opensignal-toolchain/node_modules/css-loader/node_modules/postcss/lib/parser.js:60:26)
        at parse (/Users/Greg1/projects/opensignal-toolchain/node_modules/css-loader/node_modules/postcss/lib/parse.js:25:12)
        at new LazyResult (/Users/Greg1/projects/opensignal-toolchain/node_modules/css-loader/node_modules/postcss/lib/lazy-result.js:57:24)
        at Processor.process (/Users/Greg1/projects/opensignal-toolchain/node_modules/css-loader/node_modules/postcss/lib/processor.js:36:16)
        at processCss (/Users/Greg1/projects/opensignal-toolchain/node_modules/css-loader/lib/processCss.js:165:11)
        at Object.module.exports (/Users/Greg1/projects/opensignal-toolchain/node_modules/css-loader/lib/loader.js:22:2)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:2
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

22reactions
djfmcommented, Jan 7, 2016

@jhnns false alarm, sorry!

We were mis-using the ExtractTextPlugin plugin and sass-loader wasn’t even invoked, hence the parse error when css-loader tried to parse the raw sass.

For reference, the corrected version of the loader that we now use is as follows:

{
        test: /\.scss$/,
        loader: ExtractTextPlugin.extract(
                "style",
                "css?sourceMap!postcss!sass?sourceMap"
        )
}

Maybe some of the other reported errors are also due to a misconfiguration of something other than sass-loader itself.

6reactions
jhnnscommented, Jan 12, 2016

In your configuration, the postcss-loader is executed before the sass-loader. Maybe PostCSS isn’t able to parse SASS? 😁

Read more comments on GitHub >

github_iconTop Results From Across the Web

Comments in Word 2016 displayed as "Author"
Comments in Word 2016 displayed as "Author". In Word 2016, when opening a document I am able to add comment and it display...
Read more >
How to allow // comments in scss within Stylelint (Unknown ...
The problem is that when I use // for comments, it throws Unknown word (CssSyntaxError)Stylelint(CssSyntaxError). Double slash comments ( // ) ...
Read more >
Word track changes "unknown" bug - Google Groups
Word track changes "unknown" bug. 744 views. Skip to first unread message ... Even then, this process often results in nearby text suddenly...
Read more >
Automatic Extraction for Product Feature Words from ...
... words from the comments on the Web with both NLP technique and statistical method. Left context entropy is proposed to extract unknown...
Read more >
Understanding your "Words in Context" subscore (article)
As you encounter unfamiliar words or phrases, practice using context clues to determine ... Let us know if you have any questions in...
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