TypeError: Cannot read property 'type' of null
See original GitHub issuemy error when i type style attribute:
TypeError: Cannot read property 'type' of null
at Object.astHelpers.hasArrayOfStyleReferences (/home/afdalwahyu/Documents/projects/gagclone/node_modules/eslint-plugin-react-native/lib/util/stylesheet.js:312:11)
at Object.astHelpers.collectStyleReferences (/home/afdalwahyu/Documents/projects/gagclone/node_modules/eslint-plugin-react-native/lib/util/stylesheet.js:157:20)
at EventEmitter.JSXAttribute (/home/afdalwahyu/Documents/projects/gagclone/node_modules/eslint-plugin-react-native/lib/rules/no-unused-styles.js:46:35)
at emitOne (events.js:95:20)
at EventEmitter.emit (events.js:182:7)
at NodeEventGenerator.enterNode (/home/afdalwahyu/Documents/projects/gagclone/node_modules/eslint/lib/util/node-event-generator.js:40:22)
at CodePathAnalyzer.enterNode (/home/afdalwahyu/Documents/projects/gagclone/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:608:23)
at CommentEventGenerator.enterNode (/home/afdalwahyu/Documents/projects/gagclone/node_modules/eslint/lib/util/comment-event-generator.js:97:23)
at Controller.enter (/home/afdalwahyu/Documents/projects/gagclone/node_modules/eslint/lib/eslint.js:927:36)
at Controller.__execute (/home/afdalwahyu/Documents/projects/gagclone/node_modules/estraverse/estraverse.js:397:31)
.eslintrc rules that make eslint show error
"rules": {
....
"react-native/no-unused-styles": 2,
.....
}
I’m using
eslint-plugin-react-native@2.0.0
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
TypeError: Cannot read property 'type' of null - Stack Overflow
I resolve it by installing the @angular/cdk 8.0.0 version. When I installed 8.2.3, as build would report error as Cannot read property 'type'...
Read more >Uncaught TypeError: Cannot read property of null - iDiallo
This error occurs when you read a property or call a method on a null object . That's because the DOM API returns...
Read more >Improve error message: TypeError: Cannot read property 'type ...
If library-b is installed that way, then ng build library-a fails with "Cannot read property 'type' of null" (only if components are listed...
Read more >How to deal with TypeError: cannot read properties of null
While coding in Javascript, you must have at least once received a Type Error which has the message “cannot read properties of null”....
Read more >How to Avoid the Infamous "Cannot read properties of ... - Bitovi
... two ways of interpreting null and undefined types and one of them can avoid the 'Cannot read properties of undefined' runtime TypeError....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m upgrading and it’s works perfectly. I’m upgrading from 2.0.0 to 2.2.0 and it works now. Thanks for your good work 👍
I’m using atom with linter & linter-eslint packages. here is my .eslintrc file, idk maybe helpful or not 😃