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

Handlebars v4.3.0/1 prevents Adapt from running #2524

Closed
moloko opened this issue Sep 25, 2019 · 5 comments · Fixed by #2527
Closed

Handlebars v4.3.0/1 prevents Adapt from running #2524

moloko opened this issue Sep 25, 2019 · 5 comments · Fixed by #2527

Comments

@moloko
Copy link
Contributor

moloko commented Sep 25, 2019

A recent (24th Sept) update to the 'compiler' (node) version of handlebars is breaking Adapt.

If you do $ adapt create course, build it and run it, Adapt does not render and the following error is shown in the console:

Error: Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (>= 4.3.0).

There is a ticket about this issue on the handlebars repo here: handlebars-lang/handlebars.js#1561

In the meantime, Framework users should be able to work around this by updating src/core/libraries/handlebars.min.js to the latest version (note: I haven't tested that doing so won't break anything else!)

@oliverfoster
Copy link
Member

The src/core/libraries/handlebars.min.js (runtime) and the grunt compiler (package.json dependency) should match to the extent that they are compatible with each other.

How are these two copies out of sync? Is the package.json dependency too loose or does the runtime need updating?

@moloko
Copy link
Contributor Author

moloko commented Sep 25, 2019

Is the package.json dependency too loose

No, it's more that the author of handlebars should, strictly speaking, have done a major version release. But, for reasons I can understand (and which he explains in the ticket I linked to), he didn't.

@moloko
Copy link
Contributor Author

moloko commented Sep 25, 2019

If we think updating to the latest hbs runtime is a good/safe move then let's just go with that - but we'll need to do a release of every single major version of Adapt to get it out there

@moloko
Copy link
Contributor Author

moloko commented Sep 26, 2019

we'll need to do a release of every single major version of Adapt to get it out there

I've checked both FW v2.4.1 and v3.5.4 - neither is affected by this issue - so we don't need to patch and release these older versions.

@oliverfoster
Copy link
Member

oliverfoster commented Oct 30, 2019

just to confirm, this bug is only present on courses where the package.json was updated to use the ^ symbol? i.e. v4.0.0+ ?

59dbee1

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

Successfully merging a pull request may close this issue.

2 participants