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

Property typeName of TSTypeReference expected node to be of a type ["TSEntityName"] but instead got "MemberExpression" #6525

Closed
domoritz opened this issue Jun 29, 2021 · 3 comments
Labels
Stale Inactive issues

Comments

@domoritz
Copy link

🐛 bug report

When I install parcel 2 (yarn add --dev parcel@next) in https://github.com/uwdata/falcon/tree/39bca404b72cdc86f0c3ce154b48b73cc2094720, I get a ts error. It used to work with parcel 1.

🎛 Configuration (.babelrc, package.json, cli command)

See https://github.com/uwdata/falcon/tree/39bca404b72cdc86f0c3ce154b48b73cc2094720

🤔 Expected Behavior

No crash

😯 Current Behavior

🚨 Build failed.
@parcel/transformer-babel: /Users/dominik/Code/falcon/flights/index.ts: Property typeName of TSTypeReference expected node to be of a type ["TSEntityName"] but instead got "MemberExpression"
TypeError: /Users/dominik/Code/falcon/flights/index.ts: Property typeName of TSTypeReference expected node to be of a type ["TSEntityName"] but instead got "MemberExpression"
    at Object.validate (/Users/dominik/Code/falcon/node_modules/@babel/types/lib/definitions/utils.js:130:11)
    at validateField (/Users/dominik/Code/falcon/node_modules/@babel/types/lib/validators/validate.js:24:9)
    at Object.validate (/Users/dominik/Code/falcon/node_modules/@babel/types/lib/validators/validate.js:17:3)
    at NodePath._replaceWith (/Users/dominik/Code/falcon/node_modules/@babel/traverse/lib/path/replacement.js:147:7)
    at NodePath.replaceWith (/Users/dominik/Code/falcon/node_modules/@babel/traverse/lib/path/replacement.js:129:8)
    at Object.ReferencedIdentifier (/Users/dominik/Code/falcon/node_modules/babel-plugin-transform-es2015-modules-commonjs/lib/index.js:44:14)
    at Object.newFn (/Users/dominik/Code/falcon/node_modules/@babel/traverse/lib/visitors.js:212:17)
    at NodePath._call (/Users/dominik/Code/falcon/node_modules/@babel/traverse/lib/path/context.js:53:20)
    at NodePath.call (/Users/dominik/Code/falcon/node_modules/@babel/traverse/lib/path/context.js:40:17)
    at NodePath.visit (/Users/dominik/Code/falcon/node_modules/@babel/traverse/lib/path/context.js:90:31)
/Users/dominik/Code/falcon/flights/index.ts

🌍 Your Environment

Software Version(s)
Parcel 2.0.0-beta.3.1
Node 15
npm/Yarn
Operating System
@devongovett
Copy link
Member

What is in your babel config? It looks like something in babel-plugin-transform-es2015-modules-commonjs from the stack trace?

@domoritz
Copy link
Author

domoritz commented Jul 4, 2021

I only have this paper config: https://github.com/vega/falcon/blob/39bca404b72cdc86f0c3ce154b48b73cc2094720/.babelrc.

{
  "presets": [
    [
      "env",
      {
        "targets": {
          "browsers": ["last 2 Chrome versions", "last 2 Firefox versions"]
        }
      }
    ]
  ]
}

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.

@github-actions github-actions bot added the Stale Inactive issues label Feb 22, 2022
@github-actions github-actions bot closed this as completed Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Inactive issues
Projects
None yet
Development

No branches or pull requests

2 participants