Skip to content

Error while transforming with RN 0.64 and Typescript #43

Description

@mppperez

Just updated to new React Native version and it's broken again.

Output:

error app/sampleFile.ts: function (prevType) {
  this.state.exprAllowed = false;

  if (prevType === types._let || prevType === types._c...<omitted>...
} could not be cloned.
Error: function (prevType) {
  this.state.exprAllowed = false;

  if (prevType === types._let || prevType === types._c...<omitted>...
} could not be cloned.
    at Object.serialize (v8.js:202:7)
    at _default (/home/sample/app/node_modules/metro-transform-worker/node_modules/@babel/core/lib/transformation/util/clone-deep.js:18:30)
    at normalizeFile (/home/sample/app/node_modules/metro-transform-worker/node_modules/@babel/core/lib/transformation/normalize-file.js:52:36)
    at normalizeFile.next (<anonymous>)
    at run (/home/sample/app/node_modules/metro-transform-worker/node_modules/@babel/core/lib/transformation/index.js:31:50)
    at run.next (<anonymous>)
    at /home/sample/app/node_modules/metro-transform-worker/node_modules/@babel/core/lib/transform-ast.js:20:41
    at Generator.next (<anonymous>)
    at evaluateSync (/home/sample/app/node_modules/gensync/index.js:251:28)

Already updated my fork appropriately and it works with updated dependencies (+ necessary code changes). PR will be created soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions