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

TSC behaves differently on macOS and Linux: error TS2688 #48586

Closed
samuelstevens opened this issue Apr 6, 2022 · 4 comments
Closed

TSC behaves differently on macOS and Linux: error TS2688 #48586

samuelstevens opened this issue Apr 6, 2022 · 4 comments
Labels
Duplicate An existing issue was already created

Comments

@samuelstevens
Copy link

Bug Report

🔎 Search Terms

error TS2688

🕗 Version & Regression Information

I am using version 4.6.3. I didn't check other versions to see when this was introduced. Nightly version 4.7.0-dev.20220406 also has this issue.

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about TS2688

⏯ Playground Link

Repository: https://github.com/samuelstevens/apl-preview.

💻 Code

I have a file typings/AplRenderer/index.d.ts with typings for a global script.
I also have a file src/frontend/index.ts with /// <reference types="AplRenderer" />.
I specify ./typings as a typeRoots in my tsconfig.

🙁 Actual behavior

On macOS, npx tsc typechecks correctly. On Ubuntu 20.04.4 LTS, npx tsc complains error TS2688: Cannot find type definition file for 'aplrenderer'.. I use npm ci to install both from scratch.

🙂 Expected behavior

I expect them to be the same on both OSes.

@fatcerberus
Copy link

Looks related to #45096

@samuelstevens
Copy link
Author

samuelstevens commented Apr 6, 2022

Great catch. I changed everything (folder name, directive) to all lowercase on the linux machine and it worked.

Not sure if I should close this (because I have a solution) or leave it open (because there was no update to typescript).

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Apr 8, 2022
@RyanCavanaugh
Copy link
Member

Looks like a duplicate IMO. You might also try turning on forceConsistentCasingInFileNames to see if that helps

@typescript-bot
Copy link
Collaborator

This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants