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.

tasks.js expects error.filename

See original GitHub issue

https://github.com/Semantic-Org/Semantic-UI/blob/master/tasks/config/tasks.js#L92

This expects that the error will have a filename property. Sometimes other errors can be thrown and caught by this.

When it tries to access error.filename.match it throws.

Cannot call method ‘match’ of undefined suppressing the real error.

It should be

if(error.filename && error.filename.match(/theme.less/)) {

N.B

Because semantic doesn’t version its dependencies you can end up with gulp-autoprefixer 3.0.1 which requires node 12 and will make the semantic build process fail with:

/gulp-less/node_modules/accord/node_modules/when/lib/decorators/unhandledRejection.js:80
        throw e;
              ^
TypeError: Cannot call method 'match' of undefined

which is actually covering up the error:

[Error: no writecb in Transform class]

If you need to fix this force install gulp-autoprefixer to 2.3.1

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
alxkolmcommented, Sep 10, 2015

Same problem.

Fast workaround:

rm -rf node_modules/gulp-autoprefixer
npm install gulp-autoprefixer@2.3.1
0reactions
CatalanCabbagecommented, May 16, 2020

Yup, I use Fomantic-UI; commented here just in case, since this bug has been carried over from Semantic to Fomantic. Anyway, to anybody with this issue, for reference: a PR has been submitted with the fix, will be released in Fomantic 2.8.x 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

SyntaxError: expected expression, got '<', what does that mean?
Sometimes this error happens when the Javascript referenced file doesn't exist. Make sure that the file name is correct ...
Read more >
A Definitive Guide to Handling Errors in JavaScript - Kinsta
Getting tripped up by errors in your JavaScript? We'll show you how to tame those errors so you can get back to developing...
Read more >
Best Practices for Node.js Error-handling - Toptal
This article will introduce you to error-handling in Node.js and demonstrate ... Does it make sense to restart an application due to “File...
Read more >
Error handling in Node.js - LogRocket Blog
Deliver reliable software by learning how to handle errors in Node.js using callbacks, promises, and event emitters.
Read more >
A Comprehensive Guide To Error Handling In Node.js
As you can see, the readFile() method expects a callback function as its last argument, which adheres to the error-first function signature ...
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