Cannot read properties of undefined (reading 'type')
See original GitHub issueHi.
First of all, great project !
Unfortunately I’m not able to make it work,
Running hegel
or npx hegel
via CLI into the folder of my application, I have the error Cannot read properties of undefined (reading 'type')
This is my package.json
{
"version": "1.0.0",
"name": "my-website",
"private": true,
"engines": {
"node": ">=17"
},
"scripts": {
"eslint": "gulp --gulpfile gulpFile.js run-eslint"
},
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/eslint-parser": "^7.16.3",
"@hegel/cli": "^0.0.45",
"@babel/preset-flow": "^7.16.7",
"eslint": "^8.4.1",
"fs": "^0.0.2",
"glob": "^7.2.0",
"gulp": "^4.0.2",
"gulp-clean": "^0.4.0",
"gulp-cli": "^1.4.0",
"gulp-eslint": "^6.0.0",
"sass": "^1.44.0"
}
}
This is my .hegelrc file
include:
- ./wwwroot/js/**/*.js
exclude:
- ./node_modules/**
types:
- ./node_modules/@types
I’m using Babel only for ESLint, and I’m trying to use Hegel without involving Babel or other dependencies (it’s not very clear to me if Babel is mandatory to use Hegel or not), but just to be sure, I created this .babelrc file
{
"presets": [["@babel/preset-flow", { "all": true }]]
}
Can you please give me a suggestion ? Thank you very much in advance.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Cannot Read Property of Undefined in JavaScript - Rollbar
What Causes TypeError: Cannot Read Property of Undefined. Undefined means that a variable has been declared but has not been assigned a value....
Read more >[Solved] Cannot read Properties of Undefined in JavaScript
The "Cannot read properties of undefined" error occurs when you try to access a property or a method on a variable that stores...
Read more >TypeError: Cannot read properties of undefined (reading 'id')
I have this error in my terminal: TypeError: Cannot read properties of undefined (reading 'id').
Read more >Uncaught TypeError: Cannot read property of undefined In
JavaScript TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or...
Read more >Uncaught TypeError : Cannot read properties of undefined
The root cause of the error is that the declared variable doesn't have any value, so by default, JavaScript treats all variables as...
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 FreeTop 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
Top GitHub Comments
Hello @NinjaCross. Sorry, but, unfortunately, I suspended the work on Hegel in a period of the war in Ukraine to focus on help to my parents and friends in Kharkiv/Kyiv. I will continue work soon (in a few weeks).
@JSMonk , thank you! How can community help you? Can you maybe add some guide/architecture overview/roadmap for potential contributors? Currently some tests are failing, and there are some false-positives checking errors, which are hard to tell why it happens due to absence of comments.