Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very minor change to prevent many downstream packages from crashing if the DEV env var is set. #651

Merged
merged 7 commits into from May 11, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/reconciler.ts
Expand Up @@ -26,10 +26,13 @@ if (process.env['DEV'] === 'true') {
try {
await import('./devtools.js');
} catch (error: any) {
if (error.code === 'MODULE_NOT_FOUND') {
if (error.code === 'ERR_MODULE_NOT_FOUND') {
console.warn(
`
Debugging with React Devtools requires \`react-devtools-core\` dependency to be installed.
The environment variable DEV is set to true, so Ink tried to import \`react-devtools-core\`,
but this failed as it was not installed. Debugging with React Devtools requires it.

To install use this command:

$ npm install --save-dev react-devtools-core
`.trim() + '\n'
Expand Down