The runtime: event loop, streams, modules, process model and performance.
Older Node APIs such as fs.readFile(path, (err, data) => ...) pass
the error as the first callback argument. Why did Node settle on that
convention, and why doesn't a try/catch wrapped around the
fs.readFile(...) call catch a failure to read the file?
A config loader catches the error from fs.promises.readFile and
decides what to do with if (err.message.includes("no such file")).
What is wrong with that, what should it check instead, and what other
properties does a Node system error carry that are worth logging?
A nightly cleanup script exits with code 1 and prints a stack trace because one of its promises rejects and nothing handles it. What does Node do by default with an unhandled rejection, and how do you fix the script properly?
An upload service wants a quick breakdown of what people upload. Write
entryPoint(paths) that counts the stored files by extension.
paths: array of POSIX path strings (0 to 10^4 items).A small build tool compiles TypeScript sources into an output folder,
mirroring the source tree. Write
entryPoint(srcFile, srcRoot, outRoot) that returns the output path
for one source file, using path.posix so the result is the same on
A file-download service turns fs errors into HTTP responses. Write
entryPoint(errors) that maps each error to { status, retryable }.
Each error is a plain object shaped like a Node fs error, for example