-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(requireFn): stub Node's tty module (#6026)
**Problem:** Our sample store project uses Tailwind's plugins that are meant to run on Node, requiring `tty` module and breaking the `twind` process **Fix:** Stub the `tty` module. The future complete solution would be to stub all of Node builtin modules, or to run Tailwind on the server or container **Manual Tests:** I hereby swear that: - [X] I opened a hydrogen project and it loaded - [X] I could navigate to various routes in Preview mode Fixes #[ticket_number] (<< pls delete this line if it's not relevant)
- Loading branch information
Showing
3 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
editor/src/core/es-modules/package-manager/node-builtin-shims/tty-stub.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export const isatty = () => false | ||
|
||
export function ReadStream() { | ||
throw new Error('tty.ReadStream is not implemented') | ||
} | ||
|
||
export function WriteStream() { | ||
throw new Error('tty.WriteStream is not implemented') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters