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

The prop value with an expression type of undefined could not be resolved. #23

Closed
eTorAken opened this issue Feb 7, 2017 · 4 comments
Closed

Comments

@eTorAken
Copy link

eTorAken commented Feb 7, 2017

From evcohen/eslint-plugin-jsx-a11y#178, I got an error when running eslint-plugin-jsx-a11y plugin which uses jsx-ast-utils.

Here is my configuration:

  • OS: Windows 10
  • Running ESLint: v3.8.1
  • Launched with: gulp-eslint@3.0.1
  • Stacktrace:
C:\Users\Clément\Documents\Work\phoenix\www\node_modules\jsx-ast-utils\lib\values\expressions\index.js:170
    throw new Error(errorMessage(type));
          ^
Error: The prop value with an expression type of undefined could not be resolved.
  Please file issue to get this fixed immediately.
    at extract (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\jsx-ast-utils\lib\values\expressions\index.js:170:11)
    at Object.extractValueFromConditionalExpression [as ConditionalExpression] (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\jsx-ast-utils\lib\values\expressions\ConditionalExpression.js:26:59)
    at Object.extract [as JSXExpressionContainer] (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\jsx-ast-utils\lib\values\expressions\index.js:173:21)
    at getValue (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\jsx-ast-utils\lib\values\index.js:52:27)
    at extractValue (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\jsx-ast-utils\lib\getPropValue.js:24:12)
    at getPropValue (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\jsx-ast-utils\lib\getPropValue.js:41:10)
    at EventEmitter.JSXOpeningElement (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\eslint-plugin-jsx-a11y\lib\rules\mouse-events-have-key-events.js:35:62)
    at emitOne (events.js:95:20)
    at EventEmitter.emit (events.js:182:7)
    at NodeEventGenerator.enterNode (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\eslint\lib\util\node-event-generator.js:40:22)
    at CodePathAnalyzer.enterNode (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\eslint\lib\code-path-analysis\code-path-analyzer.js:608:23)
    at CommentEventGenerator.enterNode (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\eslint\lib\util\comment-event-generator.js:97:23)
    at Controller.enter (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\eslint\lib\eslint.js:898:36)
    at Controller.__execute (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\eslint\node_modules\estraverse\estraverse.js:397:31)
    at Controller.traverse (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\eslint\node_modules\estraverse\estraverse.js:501:28)
    at Controller.Traverser.controller.traverse (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\eslint\lib\util\traverser.js:36:33)
    at EventEmitter.module.exports.api.verify (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\eslint\lib\eslint.js:895:23)
    at processText (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\eslint\lib\cli-engine.js:264:31)
    at CLIEngine.executeOnText (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\eslint\lib\cli-engine.js:756:26)
    at verify (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\gulp-eslint\index.js:20:25)
    at Transform._transform (C:\Users\Clément\Documents\Work\phoenix\www\node_modules\gulp-eslint\index.js:70:17)
    at Transform._read (_stream_transform.js:167:10)
    at Transform._write (_stream_transform.js:155:12)
    at doWrite (_stream_writable.js:301:12)
@eTorAken
Copy link
Author

It seems to be a Windows related issue. I tried the same installation on a debian machine without any problem.

@billmei
Copy link

billmei commented May 11, 2017

This also appears to be an issue on CodeClimate

/usr/local/node_modules/jsx-ast-utils/lib/values/expressions/index.js:170
    throw new Error(errorMessage(type));
    ^

Error: The prop value with an expression type of undefined could not be resolved.
  Please file issue to get this fixed immediately.
    at extract (/usr/local/node_modules/jsx-ast-utils/lib/values/expressions/index.js:170:11)
    at Object.extractValueFromConditionalExpression [as ConditionalExpression] (/usr/local/node_modules/jsx-ast-utils/lib/values/expressions/ConditionalExpression.js:26:59)
    at Object.extract [as JSXExpressionContainer] (/usr/local/node_modules/jsx-ast-utils/lib/values/expressions/index.js:173:21)
    at getValue (/usr/local/node_modules/jsx-ast-utils/lib/values/index.js:52:27)
    at extractValue (/usr/local/node_modules/jsx-ast-utils/lib/getPropValue.js:24:12)
    at getPropValue (/usr/local/node_modules/jsx-ast-utils/lib/getPropValue.js:41:10)
    at /usr/local/node_modules/eslint-plugin-jsx-a11y/lib/rules/no-static-element-interactions.js:72:95
    at Array.some (native)
    at EventEmitter.JSXOpeningElement (/usr/local/node_modules/eslint-plugin-jsx-a11y/lib/rules/no-static-element-interactions.js:71:52)
    at emitOne (events.js:101:20)
    at EventEmitter.emit (events.js:188:7)

We're running babel-eslint as our parser.

@jessebeach
Copy link
Collaborator

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

@ljharb ljharb reopened this Jul 1, 2019
@ljharb
Copy link
Member

ljharb commented Oct 14, 2020

In this case, without some code to reproduce the error, there's not much we can do.

@ljharb ljharb closed this as completed Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants