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

Regenerating javascript bundle breaks scopes with imports #101

Closed
rdeits opened this issue May 3, 2018 · 2 comments · Fixed by #99
Closed

Regenerating javascript bundle breaks scopes with imports #101

rdeits opened this issue May 3, 2018 · 2 comments · Fixed by #99

Comments

@rdeits
Copy link
Collaborator

rdeits commented May 3, 2018

This is the root cause of the problems I'm having with #99

Using WebIO.jl master, I can successfully run the scope import demo from the readme: https://github.com/JuliaGizmos/WebIO.jl#loading-javascript-dependencies in IJulia.

But if I follow the instructions to re-generate the javascript bundle, with:

using WebIO
WebIO.devsetup()
WebIO.bundlejs()

then the newly generated bundle seems to be somewhat broken. Attempting to run the same demo from the readme results in no output in IJulia, and the following error in the javascript console:

Error: Cannot find module "vm".
  Instantiating http://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.11/p5.js
  Loading //cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.11/p5.js

It looks like whatever webpack setup I'm getting with devsetup() is subtly broken or different than what was used to generate the bundle last.

@rdeits
Copy link
Collaborator Author

rdeits commented May 3, 2018

I suspect the issue is that the devsetup just installs webpack and webpack-cli without any version restrictions or locks:

run(`$npm install webpack webpack-cli --scripts-prepend-node-path`)
while bundlejs() has a package.json that specifically expects webpack ^3.8 etc.

@rdeits
Copy link
Collaborator Author

rdeits commented May 3, 2018

Hm, trying to pin down those versions doesn't resolve the issue. I'm pretty stumped.

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