sergey icon indicating copy to clipboard operation
sergey copied to clipboard

UnhandledPromiseRejection error when running sergey --watch concurrently with another script

Open joulev opened this issue 4 years ago • 3 comments

I regularly use sass in my sites, so I usually run this to make sure my compiled CSS is up to date.

$ sass --style=compressed --quiet scss/styles.scss css/styles.css --watch

Now I also want to deploy my Sergey site to localhost, so

$ sergey --watch

However, although just editing HTML files is fine, as soon as I edit my SCSS, sergey throws an error,

$ sergey --watch
Compiled in 290ms
Sergey running on http://localhost:8080
Compiled in 371ms
node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Couldn't create folder: ./public/path/to/a/random/folder/".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

Am I missing something...? since running concurrent commands like this, I think, is quite common, but I haven't seen anyone reporting this problem here.

joulev avatar Oct 05 '21 13:10 joulev

I've been regularly experiencing this as well, without running sass watch.

mas-4 avatar Oct 06 '21 18:10 mas-4

Always happens when you add non-html/js/css files

griffi-gh avatar Dec 28 '21 13:12 griffi-gh

Always happens when you add non-html/js/css files

Interesting, I assume that would be why its happening for me. I'm using markdown files.

mas-4 avatar Dec 28 '21 17:12 mas-4