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

Document is not defined #4

Open
Stef-SD opened this issue Feb 14, 2020 · 3 comments
Open

Document is not defined #4

Stef-SD opened this issue Feb 14, 2020 · 3 comments
Labels

Comments

@Stef-SD
Copy link

@Stef-SD Stef-SD commented Feb 14, 2020

I can't use the Document interface in my WarpJS warped function.

var wordElement = document.createElement('ul'); // create single word element

engine-prod.js:30 Uncaught (in promise) 
ReferenceError {stack: "ReferenceError: document is not defined↵    at fn …ndRejections (internal/process/next_tick.js:81:5)", message: "document is not defined"}
stack: "ReferenceError: document is not defined↵    at fn (eval at buildAndEvalEnvironment (/home/stef/dev/heart-of-words/.warp/server-emulation/node_modules/@warpjs/flow-server/flowServer.js:18:20209), <anonymous>:196:23)↵    at fn (eval at buildAndEvalEnvironment (/home/stef/dev/heart-of-words/.warp/server-emulation/node_modules/@warpjs/flow-server/flowServer.js:18:20209), <anonymous>:56:9)↵    at fn (eval at buildAndEvalEnvironment (/home/stef/dev/heart-of-words/.warp/server-emulation/node_modules/@warpjs/flow-server/flowServer.js:18:20209), <anonymous>:9:5)↵    at Flow.flowRun (/home/stef/dev/heart-of-words/.warp/server-emulation/node_modules/@warpjs/flow-server/flowServer.js:18:7073)↵    at processTicksAndRejections (internal/process/next_tick.js:81:5)"
message: "document is not defined"
__proto__: Error

@warpjs/webpack-plugin: ^1.1.0-rc1
@warpjs/engine: ^1.1.0-rc1

@jpl-scale
Copy link
Member

@jpl-scale jpl-scale commented Feb 14, 2020

@scajegou could you please see how we can have a better stack trace here?

@jpl-scale
Copy link
Member

@jpl-scale jpl-scale commented Feb 17, 2020

We will add clarification in documentation. Thank you.

@scajegou
Copy link

@scajegou scajegou commented Feb 17, 2020

The ugly stack trace display is because of an issue with the errors serialization / deserialization.
I'm looking into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.