JSMonk / hegel

An advanced static type checker
https://hegel.js.org
MIT License
2.09k stars 59 forks source link

Cannot read properties of undefined (reading 'type') #355

Open NinjaCross opened 2 years ago

NinjaCross commented 2 years ago

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.

NinjaCross commented 2 years ago

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

JSMonk commented 2 years ago

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

NinjaCross commented 2 years ago

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

unrealsolver commented 2 years ago

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

NinjaCross commented 2 years ago

@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 :)

JSMonk commented 2 years ago

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

NinjaCross commented 2 years ago

@JSMonk I wish you and your family the best. Thank you very much.

trusktr commented 2 years ago

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

mindplay-dk commented 1 year ago

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

JSMonk commented 1 year ago

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

mindplay-dk commented 1 year ago

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