Closed drortirosh closed 3 years ago
I would open an issue on Next.js. There's not much we can do here. We need fs
in Node.js and we have correctly excluded it for browsers per convention: https://github.com/sindresorhus/ow/blob/b2285d0d4fe59def762bd989cab067d8d9b66eab/package.json#L80-L82
To Reproduce:
yarn create next-app
import ow from "ow"
yarn dev
See error:
Root cause:
Internally, "ow" uses "fs" module when used in "node" environment. It was supposed to be disabled when used in a browser environment, but it doesn't work with Next. strangely, it does work correctly when added into plain "react" app (e.g. created with
yarn create react-app
)