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

Error on ts-patch install #54

Closed
nikita-starostin opened this issue Jul 31, 2021 · 3 comments
Closed

Error on ts-patch install #54

nikita-starostin opened this issue Jul 31, 2021 · 3 comments

Comments

@nikita-starostin
Copy link

nikita-starostin commented Jul 31, 2021

I have run:

npm i -D ts-patch
ts-patch install

and get an error: Could not recognize diagnostics signature in emitFilesAndReportErrors(). Please open an issue with your TS version #.

The ts version is 3.1.8 the command is running inside the project created with @angular/cli@7.1.4

the version had been determined from running tsc -v, however the angular project has typescript3.1.6 in package.json as dependency.

@nikita-starostin
Copy link
Author

I have also tried to

npm i -D ts-patch@1.2.2.
ts-patch install

and had the same result

@nikita-starostin
Copy link
Author

nikita-starostin commented Jul 31, 2021

have done some debugging - have gone into the sources and find out where the error has been trown from, add some console log for more information:

image

so the check for modern ts failed, then check for ts2.7 also failed

the logged rest code shows the next:
image
expectations that highlighted string should be found with 2.7 check

as next step have debugged the regex on regex101.com:
image
from screen above the problem part is (\) which tries to find the call to emit function without parameters, e.g.

var _a = program.emit();

@nikita-starostin nikita-starostin changed the title Error on runnin ts-patch install Error on ts-patch install Jul 31, 2021
@nonara nonara closed this as completed in 0fabe3c Aug 1, 2021
@nonara
Copy link
Owner

nonara commented Aug 1, 2021

Ah, good catch. Thanks for the investigative work! Should be sorted in v1.4.2

This issue was closed.
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

No branches or pull requests

2 participants