theia: Window is not defined error when starting theia backend
I’ve traced this to setRootLogger:
ReferenceError: window is not defined
at Object.setRootLogger (/home/eantotr/sync/work/theia/packages/core/lib/common/logger.js:55:29)
at Object.initialize (/home/eantotr/sync/work/theia/packages/core/lib/node/logger-backend-module.js:45:26)
at new BackendApplication (/home/eantotr/sync/work/theia/packages/core/lib/node/backend-application.js:151:38)
at _createInstance (/home/eantotr/sync/work/theia/node_modules/inversify/lib/resolution/instantiation.js:21:12)
at Object.resolveInstance (/home/eantotr/sync/work/theia/node_modules/inversify/lib/resolution/instantiation.js:41:18)
at /home/eantotr/sync/work/theia/node_modules/inversify/lib/resolution/resolver.js:72:42
at Object.resolve (/home/eantotr/sync/work/theia/node_modules/inversify/lib/resolution/resolver.js:96:12)
at /home/eantotr/sync/work/theia/node_modules/inversify/lib/container/container.js:245:37
at Container._get (/home/eantotr/sync/work/theia/node_modules/inversify/lib/container/container.js:236:44)
at Container.get (/home/eantotr/sync/work/theia/node_modules/inversify/lib/container/container.js:195:21)
@akosyakov could you take a look ?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (15 by maintainers)
Commits related to this issue
- GH-1161: Fixed the `window is undefined` issue in the logger. Added a function for resetting the root logger, so the mocha test output is not swallowed by our mock logger. Closes #1161. Signed-off-... — committed to eclipse-theia/theia by kittaakos 6 years ago
- GH-1161: Fixed the `window is undefined` issue in the logger. Added a function for resetting the root logger, so the mocha test output is not swallowed by our mock logger. Closes #1161. Signed-off-... — committed to eclipse-theia/theia by kittaakos 6 years ago
- GH-1161: Fixed the `window is undefined` issue in the logger. Added a function for resetting the root logger, so the mocha test output is not swallowed by our mock logger. Closes #1161. Signed-off-... — committed to eclipse-theia/theia by kittaakos 6 years ago
If that’s the case, we can extend
cleanupJSDOMto doglobal.window = undefined.