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

typescript fails when compilerOptions are specified without using tsconfig.json #735

Closed
Samantha-uk opened this issue Dec 15, 2020 · 3 comments · Fixed by #794
Closed

typescript fails when compilerOptions are specified without using tsconfig.json #735

Samantha-uk opened this issue Dec 15, 2020 · 3 comments · Fixed by #794

Comments

@Samantha-uk
Copy link

Expected Behavior

Compilation to proceed as specified in the compilerOptions passed in to plugin-typescript.

Actual Behavior

[!] (plugin typescript) Error: Could not load /home/runner/rollup-plugin-repro/input.ts: Debug Failure.

Additional Information

The error appears to be caused by an assertion failing inside ts.getOutputFileNames expecting there to be a tsconfig.json path.

I'll submit a PR with a test for this usecase (skipped as the test currently fails).

@shellscape shellscape changed the title bug(plugin-typescript): fails when compilerOptions are specified without using tsconfig.json typescript fails when compilerOptions are specified without using tsconfig.json Feb 5, 2021
@Samantha-uk
Copy link
Author

Samantha-uk commented Feb 6, 2021

I updated my reproduction to use (I believe) the latest rollup/typescript plugin versions
I still get the same indecipherable error message; rather than the nice one that the PR is aimed at providing. :(

input.ts → output/bundle.js...
[!] (plugin typescript) Error: Could not load /home/runner/rollup-plugin-repro/input.ts: Debug Failure.
Error: Could not load /home/runner/rollup-plugin-repro/input.ts: Debug Failure.
    at rootDirOfOptions (/home/runner/rollup-plugin-repro/node_modules/typescript/lib/typescript.js:99520:75)
    at getOutputPathWithoutChangingExt (/home/runner/rollup-plugin-repro/node_modules/typescript/lib/typescript.js:99524:71)
    at getOutputDeclarationFileName (/home/runner/rollup-plugin-repro/node_modules/typescript/lib/typescript.js:99530:35)
    at getOwnOutputFileNames (/home/runner/rollup-plugin-repro/node_modules/typescript/lib/typescript.js:99577:23)
    at Object.getOutputFileNames (/home/runner/rollup-plugin-repro/node_modules/typescript/lib/typescript.js:99608:13)
    at findTypescriptOutput (/home/runner/rollup-plugin-repro/node_modules/@rollup/plugin-typescript/dist/index.js:435:33)
    at Object.load (/home/runner/rollup-plugin-repro/node_modules/@rollup/plugin-typescript/dist/index.js:741:28)

exit status 1

@shellscape
Copy link
Collaborator

I used your original reproduction and failing test to validate the work that closed this issue. Note that it hasn't been published. Between the open issue waiting on TS 4.2.0 and the update yesterday, your issue is addressed.

@Samantha-uk
Copy link
Author

Thank you.
As it happens I modified the TS plugin and have been running it for several weeks without issue ... perhaps I'll PR it ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants