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

Breaks with ember-template-recast@5 #14

Open
jaydgruber opened this issue Feb 19, 2021 · 0 comments
Open

Breaks with ember-template-recast@5 #14

jaydgruber opened this issue Feb 19, 2021 · 0 comments

Comments

@jaydgruber
Copy link

What

  • If I follow any of the template transform examples (ember-template-recast) from the readme, I get an error:
       npx ember-template-recast app/components/settings-import-search.hbs -t https://raw.githubusercontent.com/lennyburdette/ember-action-codemods/master/src/string-actions.js
       Processing 1 file…
       Spawning 1 worker…
       🎉 Complete!
       Ok:        0
       Unchanged: 0
       Errored:   1
       ERR  /Users/jay.gruber/Documents/gitlab/avatax-customer-portal/cup-client/app/components/settings-import-search.hbs
       ERR  TypeError: Cannot destructure property 'parse' of 'undefined' as it is undefined.
         at module.exports (/private/var/folders/l9/vhlgstjd46df5lbgl6kgvlp4d7f2dz/T/tmp-276-AF8u7z2l1iaB:1:47)
         at Object.transform (/usr/local/lib/node_modules/ember-template-recast/lib/index.js:73:21)
         at applyTransform (/usr/local/lib/node_modules/ember-template-recast/lib/worker.js:57:29)
         at /usr/local/lib/node_modules/ember-template-recast/lib/worker.js:32:29
  • the jscodeshift command works fine

Why

  • because I don't have any local or global install of ember-template-recast, I think npx is grabbing the lastest (5.x) version?
  • I see in the yarn.lock ember-template-recast@^1.2.5.
  • I'm using npm in this project, not sure if that is relevant vs. the yarn.lock.

Fix

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