JSMonk / hegel

An advanced static type checker

Home Page:https://hegel.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot read properties of undefined (reading 'type')

NinjaCross opened this issue · comments

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.

@JSMonk can you please provide any suggestion about this error ?

Hello @NinjaCross. Sorry for so long answer. Seems like it's an analysis error, so,I will fix it in a new version

Hello @NinjaCross. Sorry for so long answer. Seems like it's an analysis error, so,I will fix it in a new version

Thankyou @JSMonk , I'll eagerly wait for the new version then :)

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

@JSMonk do you have any update about this ?
We are eager to add Hegel to our tooling, but we cannot proceed until this is solved.
Thank you very much for you effort :)

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 I wish you and your family the best.
Thank you very much.

That war has wreaked havoc. May your friends and fam be safe.

@JSMonk one year on, just passing by here, wondering if you and your family are okay? 🙏

Thankfully, my family is safe, they are still in Ukraine (Kharkiv), but everything is alright.
Thank you a lot for your attention 🙏

Kharkiv, I hope they're not on the outskirts of the city.

If you need to run, come to Denmark. Currently, all Ukrainians receive a 1-year unconditional visa, free health care, work permit, access to education, temporary housing, and so on.

I hope you never have to run! But it sounds like this war might carry on for a while. 😔