How do I setup my local environment such that import { OpenAI } from "openai" succeeds

It turns out that my issue was confusion resulting from exposure to too many new things at once: scrims, node.js, vscode, and vite (and, of course, AI itself). Although the issue arose in the context of the AI Engineer Path course it is more properly a general issue. For anyone arriving here and being similarly confused, have a look at: