-
Notifications
You must be signed in to change notification settings - Fork 181
ERROR in awesome-typescript-loader #619
Comments
Try adding "dom" lib into the tsconfig.json compilerOptions
or declare the object as any |
@darklightcode, "dom" is already added. Declare the object does not solve this problem. I'm think that is a bug of typescript 3.2, because in version 3.1.6. all good. |
Also can replicate running on Typescript 3.2.2, whereas it works fine on 3.1.6. |
Most likely duplicate of #618 |
For anyone else coming in via Google, had this (It gave the same top level "Buffer or String" error as #618 which may be related, but I confirmed that my issue was around This issue is related to TypeScript itself crashing because of microsoft/TypeScript#28810 For anyone looking for a temporary fix, I'd recommend (window.history as any).replaceState Or, if you're like me, and you can't cast to /**
* put a big comment here about the TypeScript + window.history issue,
* so other people will judge you less
*/
window["h"+"istory"].replaceState |
I had similar issues but some of the workarounds above didn't work for me so I used the following (window as any).history |
I'm get a error:
ERROR in ./ClientApp/src/utils/utils.ts
Module build failed: Error: Final loader (./node_modules/awesome-typescript-loader/dist/entry.js) didn't return a Buffer or String
utils.ts:
export function removeRouteParams() {window.history.replaceState({}, document.title, '/');}
If i'm remove
window.history
, then error is dissapearedThe text was updated successfully, but these errors were encountered: