-
Notifications
You must be signed in to change notification settings - Fork 675
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
TypeScript compilation fails when using Yarn PnP #7412
Comments
Thank you for your research and sharing the example. I was able to reproduce the issue. private _compileFilesToCache (ts: TypeScriptInstance, filenames: string[]): void {
const opts = this._tsConfig.getOptions() as Dictionary<CompilerOptionsValue>;
// NOTE: I added the following line
filenames = filenames.map(name => TypeScriptTestFileCompiler._normalizeFilename(name));
const program = ts.createProgram([TypeScriptTestFileCompiler.tsDefsPath, ...filenames], opts); |
Duplicate of #7710 |
@testorangemac would you be willing to share your patch to resolve this issue? I'm going to see if I can figure it out in the meantime. I'm seeing this when trying to run tests:
I never noticed that the drive letter was the issue until you pointed it out! Thanks. |
Never mind! I applied the change that @AlexKamaev and the tests started just fine. I'm relieved to see the tests running, as this was the last hurdle I had when trying to switch to Yarn PnP. Thank you both. |
## Purpose TypeScript compilation fails when using Yarn PnP ## Approach Added file's path normalization for typescript test. Couldn't add test due to OS specificity ## References [7412](#7412)
What is your Scenario?
TypeScript compilation fails when using Yarn PnP. See the minimal working example repository or the steps to reproduce.
What is the Current behavior?
The following error is reported:
What is the Expected behavior?
TypeScript compilation works and the test is successfully run.
What is your public website URL? (or attach your complete example)
https://github.com/testorangemac/yarn-testcafe-berry
What is your TestCafe test code?
Your complete configuration file
n/a
Your complete test report
n/a
Screenshots
n/a
Steps to Reproduce
yarn init -2
(in a new directory)yarn add -D testcafe
yarn testcafe chrome getting-started.ts
TestCafe version
2.1.0
Node.js version
v19.2.0
Command-line arguments
chrome getting-started.ts
Browser name(s) and version(s)
Chrome 108
Platform(s) and version(s)
Windows 10 Pro
Other
I have made the following observations:
C
vsc
.js
) it runs fineprocess.cwd()
fixes the issue and runs the test fineThe text was updated successfully, but these errors were encountered: