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

Transformation error (Received an unexpected value [object Object]) #540

Open
bmaehr opened this issue Aug 15, 2023 · 0 comments
Open

Transformation error (Received an unexpected value [object Object]) #540

bmaehr opened this issue Aug 15, 2023 · 0 comments

Comments

@bmaehr
Copy link

bmaehr commented Aug 15, 2023

I have tried the codemode with multiple different ember verisions and projects and never got it to work. I get for each file the error message:

 ERR app/components/change/change-edit.js Transformation error (Received an unexpected value [object Object])
TypeError: Received an unexpected value [object Object]
    at fromAST (C:\Users\bmaehr\AppData\Local\Yarn\Data\global\node_modules\jscodeshift\src\/core.js:73:9)
    at core (C:\Users\bmaehr\AppData\Local\Yarn\Data\global\node_modules\jscodeshift\src\/core.js:47:5)
    at getDecoratorPathSpecifiers (C:\Users\bmaehr\AppData\Local\Yarn\Data\global\node_modules\ember-native-class-codemod\transforms\helpers\/import-helper.js:166:42)
    at createDecoratorImportDeclarations (C:\Users\bmaehr\AppData\Local\Yarn\Data\global\node_modules\ember-native-class-codemod\transforms\helpers\/import-helper.js:188:39)
    at maybeTransformEmberObjects (C:\Users\bmaehr\AppData\Local\Yarn\Data\global\node_modules\ember-native-class-codemod\transforms\helpers\/transform.js:24:58)
    at transformer (C:\Users\bmaehr\AppData\Local\Yarn\Data\global\node_modules\ember-native-class-codemod\transforms\ember-object\/index.js:41:39)
All done.

If I print out the object at that place it looks like this:

<ref *1> NodePath {
  value: Node {
    type: 'ImportDeclaration',
    start: 132,
    end: 183,
    loc: SourceLocation {
      start: [Position],
      end: [Position],
      filename: undefined,
      identifierName: undefined,
      lines: [Lines],
      tokens: [Array],
      indent: 0
    },
    importKind: 'value',
    specifiers: [],
    source: Node {
      type: 'StringLiteral',
      start: 166,
      end: 182,
      loc: [SourceLocation],
      extra: [Object],
      value: '@ember/service',
      regex: null
    }
  },
  parentPath: NodePath {
    value: [ [Node], [Node], [Node], [Node], [Node] ],
    parentPath: NodePath {
      value: [Node],
      parentPath: [NodePath],

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