Fixing the “are in sync” error from npm ci
How to fix the “are in sync” error when npm ci stops in CI (GitHub Actions and similar) after only packag ...
Fixing “await is only valid in async functions” in JavaScript
I reproduced the “await is only valid in async functions” error, caused by forgetting async on a function ...
Fixing “Invalid time value” in JavaScript
When a date typed into a form or passed as a command-line argument is converted with toISOString() for an API, you ge ...
Fixing “Converting circular structure to JSON” in JavaScript
When JSON.stringify runs before saving to localStorage or sending with fetch and shows “Converting circular str ...
How to Fix “is not a constructor” in JavaScript
“X is not a constructor” appears when you call `new` on a class you wrote or a library you imported, and ...
Fixing TS1378 “Top-level ‘await’ expressions are only allowed” in TypeScript
In a Node.js script, writing await outside a function can make tsc report TS1378. I confirmed that the error goes awa ...
How to Fix the npm EUNSUPPORTEDPROTOCOL Error
‘If npm install fails with EUNSUPPORTEDPROTOCOL (Unsupported URL Type “workspace:”), a package.json ...
