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

Unmodified when running codemod #530

Open
Filoteemo opened this issue Apr 25, 2023 · 4 comments
Open

Unmodified when running codemod #530

Filoteemo opened this issue Apr 25, 2023 · 4 comments

Comments

@Filoteemo
Copy link

Working on a app running Ember v 3.15. When trying to mod any files to native class I get 200 in response but it won't modify any of the files specified.
This is the cli output:
image

And the codemods logfile says "Could not find runtime data NO_RUNTIME_DATA".

Example of file that is being specified in the path of the command:

`import { computed } from '@ember/object'
import Component from 'eea/component'

export default Component.extend({
classNames: ['go-card'],
classNameBindings: ['hasImage', 'hasAction'],
tagName: 'button',
title: '',
subtitle: '',
icon: 'arrow-right',
hasImage: computed('image', function () {
return this.get('image') ? 'has-image' : ''
}),
hasAction: computed('action', function () {
return this.get('action') ? 'has-action' : ''
}),
click: function () {
if (this.hasAction) this.cardAction()
},
})`

@gitKrystan
Copy link
Collaborator

Hi @Filoteemo. Sorry you're having issues. I'm happy to help!

When you are running the codemod, are you running a server and pointing the codemod to it, e.g.:

npx ember-native-class-codemod http://localhost:4200/path/to/server [OPTIONS] path/of/files/ or/some**/*glob.js

@Filoteemo
Copy link
Author

Filoteemo commented Apr 25, 2023

Thanks @gitKrystan. Yes correct. And as from the cli output it processes the file but doesn't modify it.

@gitKrystan
Copy link
Collaborator

@Filoteemo Can you try the latest version of this codemod, released yesterday. It's very unlikely that it will resolve your issue, but I did some work around error handling that might surface more useful information.

At this point, I suspect some issue w/ your setup + ember-codemods-telemetry-helpers, which unfortunately I have no experience debugging.

@Filoteemo
Copy link
Author

Thanks! I will give it a try.

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

2 participants