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.

Cannot read properties of undefined (reading 'type')

See original GitHub issue

Hi. 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:open
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

26reactions
JSMonkcommented, Mar 22, 2022

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).

4reactions
unrealsolvercommented, Feb 14, 2022

@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.

Read more comments on GitHub >

github_iconTop 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 >

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