Cannot find module 'cypress/integration/some-file.json' or its corresponding type declarations #23129
Unanswered
coler-j
asked this question in
Questions and Help
Replies: 2 comments
-
hello! 👋 have you installed the |
Beta Was this translation helpful? Give feedback.
0 replies
-
I am just trying to import a JSON file from within my own repository.
…On Fri., Aug. 5, 2022, 6:26 p.m. Sara Tavares, ***@***.***> wrote:
hello! 👋
have you installed the @types of the module you want to use?
—
Reply to this email directly, view it on GitHub
<#23129 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3Z673BMDWS2J723O4QWATVXWIKTANCNFSM55URN45Q>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am having trouble importing
json
into ts tests.My
tsconfig
looks like:In
/cypress/tsconfig.json
I have a test file like:
In
cypress/integration/sometest.ts
Where
cypress/integration/some-file.json
is a valid json file.I get the error:
I have added
resolveJsonModule
to the tsconfig and restarted my IDE / TS server but am still having the issue.I am on TS version 4.6.4
And
"cypress": "10.3.0",
as well as
Do I need some special webpack configuration to recongnize json files?
Beta Was this translation helpful? Give feedback.
All reactions