ember-ast-helpers icon indicating copy to clipboard operation
ember-ast-helpers copied to clipboard

Cannot find module '@glimmer/syntax' with 0.4

Open samselikoff opened this issue 7 years ago • 5 comments

Latest published seems to be 0.4, but it throws error:

Cannot find module '@glimmer/syntax'

Downgrading to 0.3.5 seemed to get me going.

Should we make 0.4 a pre-release? I couldn't find it in Github.

Let me know if I can help!

samselikoff avatar Jun 20 '18 04:06 samselikoff

We must make this not rely on any specific version of @glimmer/syntax but use this.syntax from whatever version the app uses

cibernox avatar Jun 20 '18 07:06 cibernox

@cibernox how should an addon include @glimmer/syntax? I'm trying to update @fortawesome/ember-font-awesome to 0.4.0, but I get

Template Compiler Error (broccoli-persistent-filter:TemplateCompiler) in dummy/templates/application.hbs

this.syntax.parse is not a function

when running tests. My first guess is that addons don't provide a version of @glimmer/syntax by default, but I'm not sure.

jrjohnson avatar Feb 03 '19 18:02 jrjohnson

I need to revisit this, I believe we shouldn't be importing the syntax from anywhere but rather access whatever version is available in the context.

cibernox avatar Feb 04 '19 10:02 cibernox

My new idea is to add a dev-dependency on @glimmer/syntax. What I'm not sure about is why this addon doesn't have this already and how I would ensure that apps that consume it do.

jrjohnson avatar Feb 04 '19 15:02 jrjohnson

Actually looking at some apps @glimmer/syntax doesn't appear with npm ls @glimmer/syntax other that from this package. So I'm not sure this is something that would be available in any context and should probably be provided as a dependency of this library.

jrjohnson avatar Feb 04 '19 18:02 jrjohnson