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

Unknown compiler option 'ignoreDeprecations' #6616

Closed
1 task done
mameaw14 opened this issue Mar 21, 2023 · 2 comments
Closed
1 task done

Unknown compiler option 'ignoreDeprecations' #6616

mameaw14 opened this issue Mar 21, 2023 · 2 comments

Comments

@mameaw14
Copy link

mameaw14 commented Mar 21, 2023

What version of astro are you using?

2.1.4

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Mac

What browser are you using?

Firefox, Chrome

Describe the Bug

When I run my jest test on astro 2.1.4

  ● Test suite failed to run

    node_modules/astro/tsconfigs/base.json:28:5 - error TS5023: Unknown compiler option 'ignoreDeprecations'.

    28     "ignoreDeprecations": "5.0"
           ~~~~~~~~~~~~~~~~~~~~

will found this error

in the package node_modules/astro/tsconfigs/base.json have this line

    // TypeScript 5.0 changed how `isolatedModules` and `importsNotUsedAsValues` works, deprecating the later
    // Until the majority of users are on TypeScript 5.0, we'll have to supress those deprecation errors
    "ignoreDeprecations": "5.0"

I think I suppose to use typescript v5 in order to make it works. I know it's build in by astro. So, I check my typescript version and it's 4.9.4.

npm list typescript
├─┬ [email protected]
│ └── [email protected]
└─┬ [email protected]
  └── [email protected] deduped

Not sure astro should update typescript to be 5? or I need to do something with my jest setup. Beside jest test, the application can build and run normally. Sorry if it's not a bug.

This is my code https://github.com/mameaw14/mameaw14.github.io

Link to Minimal Reproducible Example

https://github.com/mameaw14/mameaw14.github.io/actions/runs/4481801471/jobs/7879010494#step:6:16

Participation

  • I am willing to submit a pull request for this issue.
@Princesseuh
Copy link
Member

Princesseuh commented Mar 21, 2023

Hello, please update to TypeScript 4.9.5, which added ignoreDeprecations. astro itself just depends on any versions of TypeScript, so reinstalling should be fine. Not sure about ts-jest though, but I'd assume it'd allow you to use 4.9.5

dwightgunning added a commit to dwightgunning/dwightgunning.com that referenced this issue Apr 3, 2023
Astro assumes a TS version that supports 'ignoreDependency'. Described here: withastro/astro#6616
tordans added a commit to osmberlin/parkraum.osm-verkehrswende.org that referenced this issue Apr 26, 2023
@timmywil
Copy link

timmywil commented Jun 1, 2023

For anyone coming here later like me, if you see this error in VS code, also change the typescript version used to the workspace version. The one that comes with VS code is older than 4.9.5.

dwightgunning added a commit to dwightgunning/dwightgunning.com that referenced this issue Jun 29, 2023
Astro assumes a TS version that supports 'ignoreDependency'. Described here: withastro/astro#6616
dwightgunning added a commit to dwightgunning/dwightgunning.com that referenced this issue Jun 29, 2023
Astro assumes a TS version that supports 'ignoreDependency'. Described here: withastro/astro#6616
dwightgunning added a commit to dwightgunning/dwightgunning.com that referenced this issue Jun 29, 2023
Astro assumes a TS version that supports 'ignoreDependency'. Described here: withastro/astro#6616
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

3 participants