Open mrtnzlml opened 1 year ago
Flow doesn't support node: imports such as:
node:
import fs from 'node:fs';
Currently, the following error is thrown:
Cannot resolve module node:fs. [cannot-resolve-module]
The only supported syntax is the original version without node: prefix:
import fs from 'fs';
This affects all Node.js imports, not just fs.
fs
See: https://nodejs.org/api/esm.html#node-imports
Hi, as a temporary (or not so temporary) solution you could install flow-typed node environment. https://flow-typed.github.io/flow-typed/#/env-definitions
node
Missing/Incorrect APIs
Flow doesn't support
node:
imports such as:Currently, the following error is thrown:
The only supported syntax is the original version without
node:
prefix:This affects all Node.js imports, not just
fs
.Relevant documentation
See: https://nodejs.org/api/esm.html#node-imports