node --input-type=module

Category: Node.js & npm/yarn

node --input-type=module

Tell Node to treat piped stdin code as ES module syntax rather than CommonJS

Tells Node to treat code piped via stdin as ES module syntax instead of CommonJS — necessary if your piped code uses 'import'.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.