глобальная переменная в angular 9 polyfills.ts ошибка или полный размер стека - PullRequest
0 голосов
/ 24 апреля 2020

Я разрабатываю Angular 9 с vtk. js. Но возникает эта ошибка.

macro.js:35 Uncaught ReferenceError: global is not defined
at Object../node_modules/vtk.js/Sources/macro.js (macro.js:35)
at __webpack_require__ (bootstrap:79)
at Object../node_modules/vtk.js/Sources/Rendering/Misc/FullScreenRenderWindow/index.js (index.js:1)
at __webpack_require__ (bootstrap:79)
at Module../src/app/app.component.ts (app.component.ts:1)
at __webpack_require__ (bootstrap:79)
at Module../src/app/app.module.ts (app.module.ts:1)
at __webpack_require__ (bootstrap:79)
at Module../src/main.ts (main.ts:1)
at __webpack_require__ (bootstrap:79)

Итак, я вставил (окно как любое) .global = window; к polyfills.ts, но также возникает эта ошибка:

ERROR RangeError: Maximum call stack size exceeded
at _typeof2 (macro.js:1)
at _typeof2 (macro.js:1)
at _typeof2 (macro.js:1)
at _typeof2 (macro.js:1)
at _typeof2 (macro.js:1)
at _typeof2 (macro.js:1)
at _typeof2 (macro.js:1)
at _typeof2 (macro.js:1)
at _typeof2 (macro.js:1)
at _typeof2 (macro.js:1)

Как я могу решить эту проблему? Помоги мне, если кто-нибудь знает это. Привет

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...