question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeCastExpression could not be resolved

See original GitHub issue

Hi,

I was just upgrading eslint and all its plugins and now getting this error when trying to lint with the following setup:

  • “eslint”: “4.16.0”,
  • “eslint-config-airbnb”: “16.1.0”,
  • “eslint-plugin-flowtype”: “2.41.0”,
  • “eslint-plugin-import”: “2.8.0”,
  • “eslint-plugin-jsx-a11y”: “6.0.3”,
  • “eslint-plugin-mocha”: “4.11.0”,
  • “eslint-plugin-react”: “7.5.1”,
  • “babel-eslint”: “8.2.1”,

Full Error Message:

Error: The prop value with an expression type of TypeCastExpression could not be resolved.
  Please file issue to get this fixed immediately.
    at Object.extract [as JSXExpressionContainer] (/Users/mil/Development/wizard/node_modules/jsx-ast-utils/lib/values/expressions/index.js:179:11)
    at getValue (/Users/mil/Development/wizard/node_modules/jsx-ast-utils/lib/values/index.js:48:27)
    at extractValue (/Users/mil/Development/wizard/node_modules/jsx-ast-utils/lib/getPropValue.js:24:12)
    at getPropValue (/Users/mil/Development/wizard/node_modules/jsx-ast-utils/lib/getPropValue.js:41:10)
    at /Users/mil/Development/wizard/node_modules/eslint-plugin-jsx-a11y/lib/rules/no-static-element-interactions.js:78:95
    at Array.some (<anonymous>)
    at JSXOpeningElement (/Users/mil/Development/wizard/node_modules/eslint-plugin-jsx-a11y/lib/rules/no-static-element-interactions.js:77:52)
    at listeners.(anonymous function).forEach.listener (/Users/mil/Development/wizard/node_modules/eslint/lib/util/safe-emitter.js:47:58)
    at Array.forEach (<anonymous>)
    at Object.emit (/Users/mil/Development/wizard/node_modules/eslint/lib/util/safe-emitter.js:47:38)

Any idea?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jessebeachcommented, Jun 26, 2019

Found it. I’m adding a test case and getting this fixed.

0reactions
jessebeachcommented, Jul 1, 2019

@7yp0 , Fixed in version v2.2.1. This will log an error in the console, but it will no longer throw.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error using type cast expression with yield expression #2477
The repro looks like function *test() { ((yield 4): number); } When I try the repl, I get repl: unknown Expression of type ......
Read more >
Can't typecast to int in C; Error: Expected expression before ...
I was trying to write a code for binary search but can't typecast the value of (beg+end)/2 to mid. error: expected expression before...
Read more >
Type Casting Expressions
This example is not solved well in practice. Type Casting through any. Because type casts work the same as all other type annotations,...
Read more >
Expression Evaluator Error CXX0017
This error can occur when trying to typecast a variable in order to watch the variable during debugging. The typedef declares a new...
Read more >
Documentation: 15: 4.2. Value Expressions
Here, expression represents any value expression that does not itself contain ... It is also possible to specify a type cast using a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found