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

fix: log an error while trying to register ts-node #804

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

KuznetsovRoman
Copy link
Member

No description provided.

swc: JSON.parse(process.env.TS_NODE_SWC ?? swc.toString()),
});
} catch (err) {
console.error("hermione: an error occured while trying to register ts-node:", err);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while ts-node registration

может докинем еще значения, с которыми пытались зарегаться?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я сделал так, чтобы ловить любые ошибки при регистрации, чтобы ловить не только ошибки парсинга. Сейчас там пишется:

% TS_NODE_SWC=False npx hermione
SyntaxError: Unexpected token F in JSON at position 0
    at JSON.parse (<anonymous>)
    at tryToRegisterTsNode (.../node_modules/hermione/build/utils/typescript.js:29:27)
    at new BaseHermione (.../node_modules/hermione/build/base-hermione.js:19:9)
...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Могу в принципе и добавить эти значения

Copy link
Member

@sipayRT sipayRT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

в остальном ок

@KuznetsovRoman KuznetsovRoman force-pushed the HERMIONE-1252.ts_node_err branch from 0f345b5 to e5f4323 Compare November 14, 2023 00:09
@KuznetsovRoman KuznetsovRoman merged commit 9ac8c0d into master Nov 14, 2023
2 checks passed
@KuznetsovRoman KuznetsovRoman deleted the HERMIONE-1252.ts_node_err branch November 14, 2023 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants