Open christianvuerings opened 3 years ago
Another case of this was reported in https://github.com/facebook/relay/issues/1613#issuecomment-707187979
Actually, I think this breaks watch mode when files are deleted. I'd not risk new breakage (since internal usage of the JS based compiler is pretty minimal by now, so we have less coverage for breakages).
Maybe you can change the directory name? I suspect it's some directory ending in .js
maybe?
@kassens thanks for taking a look. We use file based routing at Pinterest which means we can't update the directory name.
Right now, we use a forked version of the relay compiler: https://registry.npmjs.org/@christianv/relay-compiler/
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Repro Steps
.
dot in it. Example:routes/advertiser/[aid]/quick-promote.js/quick-promote.a11y.js
relay-compiler
Issue
hashFile
receives a directory as thefilename
argument:routes/advertiser/[aid]/quick-promote.js
and tries to do anfs.readFileSync
on it.https://github.com/facebook/relay/blob/86842c141eb59b31269893f224bf24375a2b3539/packages/relay-compiler/codegen/CodegenWatcher.js#L239-L240