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

Papaparse 5.5.2 in GraalVM Papa is not exported to globalscope #1088

Open
kempe63 opened this issue Feb 10, 2025 · 0 comments
Open

Papaparse 5.5.2 in GraalVM Papa is not exported to globalscope #1088

kempe63 opened this issue Feb 10, 2025 · 0 comments

Comments

@kempe63
Copy link

kempe63 commented Feb 10, 2025

Papaparse load ok with: load(SCRIPTS_DIR + "./lib/papaparse.js");
But when calling Papa.parse I get the following error:
org.graalvm.polyglot.PolyglotException: ReferenceError: "Papa" is not defined
at .:program(refresh_central_metadata_Qlik.ajs:37)
at .:program(:1)
at org.graalvm.polyglot.Context.eval(Context.java:399)
at com.oracle.truffle.js.scriptengine.GraalJSScriptEngine.eval(GraalJSScriptEngine.java:478)
at com.oracle.truffle.js.scriptengine.GraalJSScriptEngine.eval(GraalJSScriptEngine.java:446)

I needed to add the following line:
line 1944: globalThis.Papa = Papa;
just above 'return Papa;'

Now it's working ok

The environment is Archi modelling with scripting plugin running GraalVM

Hope this helps

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

No branches or pull requests

1 participant