-
Notifications
You must be signed in to change notification settings - Fork 12.8k
[BUG] Error: Debug Failure. Invalid cast. The supplied value [object Object] did not pass the test 'isJsonSourceFile'. #28762
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
Comments
had a similar issue.wait...... |
Seems like we are doing something wrong when getting import type for module // global.d.ts
declare global {
const React: typeof import("./module");
}
export {};
// module.d.ts
export as namespace ReactDOM;
export function foo(): string; |
I got this issue while using webpack's dev server (in a project based on create-react-app). It will compile fine initially, but it will then throw this error whenever it attempts to re-compile. |
Can confirm, that's my issue as well after updating to 3.2.1, although I'm using webpack standalone(no create react app) |
This seems to be fixed in |
Ah, no, it's not fixed in master, i just had an outdated |
I remove |
Same issue here. The only change I made to a repository is to update 3.1.3 to 3.2.1. |
Same issue, also went from 3.1.3 to 3.2.1. I tried making the change suggested by @li2568261, however our project requires esModuleInterop to build at all. (It's a React Redux frontend building with babel-loader, awesome-typescript-loader and through webpack) |
I have the same error with different cause (I guess):
Any idea? |
If typescript version is locked to 3.1.6 it will remove the 'isJsonSourceFile' error |
@A-Atrash with what version of the compiler? This fix is only in |
I have installed
while the Any idea? |
Does something in the react module somehow depend on the global declaration you add? Offhandedly, that's what I can think of. |
@weswigham I solved it by downgrading to TypeScript 3.1 (if this makes sense!) |
I have no idea. I never modified I am going to export the types of React as global Object, for I import React in html's script tag via CDN. |
I am still getting the same error in TypeScript 3.2.2 where it should have been fixed.
|
@livthomas the betas work for me e.g. |
Still having this issue with typescript@next , which is now 3.4.0-dev[31st jan 2019] |
Same issue with typescript@next |
Do you have a small repro? |
@weswigham https://github.com/IIIF-Commons/iiif-metadata I solved it by updating stencil to As far as I can tell it's the contents of |
Stencil |
Right... Makes sense!
…On Fri, 3 May 2019, 04:42 Wesley Wigham, ***@***.***> wrote:
Stencil 0.16.2 uses TS 3.2.2 internally (irrespective of what version you
install above it), which'd be why upgrading stencil fixed it for you :P
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#28762 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKFY6IYAE5DL425C6PACH3PTOYD7ANCNFSM4GHNZYHQ>
.
|
TypeScript Version: 3.2.1
Search Terms:
Code
Expected behavior:
Actual behavior:
Playground Link:
https://gist.github.com/magic-akari/aa10dfb809268eb4f63d5749d113a93a
Related Issues:
The text was updated successfully, but these errors were encountered: