Skip to content
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

require('xterm-player') leads to window is not defined in node env #12

Open
JavaCS3 opened this issue Mar 4, 2020 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@JavaCS3
Copy link
Owner

JavaCS3 commented Mar 4, 2020

looks like a webpack 4 bug
https://medium.com/@JakeXiao/window-is-undefined-in-umd-library-output-for-webpack4-858af1b881df

@JavaCS3 JavaCS3 added the bug Something isn't working label Mar 4, 2020
@JavaCS3 JavaCS3 self-assigned this Mar 4, 2020
JavaCS3 added a commit that referenced this issue Mar 4, 2020
@JavaCS3
Copy link
Owner Author

JavaCS3 commented Mar 4, 2020

In v0.0.8

> require('xterm-player')
Thrown:
ReferenceError: window is not defined
    at Object.<anonymous> (/private/tmp/test/node_modules/xterm/lib/xterm.js:1:224)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at webpackUniversalModuleDefinition (/private/tmp/test/node_modules/xterm-player/dist/js/xterm-player.js:3:28)

This should be fixed in xterm.js
xtermjs/xterm.js#2749

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant