eidam / cf-workers-status-page

Monitor your websites, showcase status including daily history, and get Slack/Telegram/Discord notification whenever your website status changes. Using Cloudflare Workers, CRON Triggers, and KV storage.
https://status-page.eidam.dev
MIT License
2.36k stars 1.44k forks source link

unhandled promise; can't deploy #33

Closed teh-maxh closed 3 years ago

teh-maxh commented 3 years ago

Deploy fails with an UnhandledPromiseRejectionWarning.

(node:324) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/github/workspace/out/_flareact/static/build-manifest.json'
    at Object.openSync (fs.js:462:3)
    at Object.readFileSync (fs.js:364:35)
    at Object.<anonymous> (/github/workspace/node_modules/flareact/configs/webpack.worker.config.js:19:8)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/github/workspace/node_modules/flareact/webpack.js:1:18)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
(node:324) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:324) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
thread 'main' panicked at 'could not parse wranglerjs output: Error("EOF while parsing a value", line: 1, column: 0)', src/wranglerjs/mod.rs:49:43
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
eidam commented 3 years ago

Hello @teh-maxh, could you please provide more info on how I can replicate it? Is it error from Github Actions or from local deployment? What are the steps you did? :)

teh-maxh commented 3 years ago

The github action. It was automatically triggered (in my case, by editing wrangler.toml) but failed.

eidam commented 3 years ago

I wondered if it was caused by some dependency.. but seems like my new build worked out well 🤔 https://github.com/eidam/cf-workers-status-page/runs/1912974892

When it started, did you try retrying the job?

teh-maxh commented 3 years ago

Yeah. Still doesn't work, unfortunately.

teh-maxh commented 3 years ago

UPDATE: Turns out I am very stupid and didn't notice that the status message strings in config.yaml are single-quoted. That doesn't work well when you try to put an apostrophe in the string. Making them double-quoted makes it work.