hegel icon indicating copy to clipboard operation
hegel copied to clipboard

Cannot read properties of undefined (reading 'type')

Open NinjaCross opened this issue 3 years ago • 11 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.

NinjaCross avatar Jan 16 '22 11:01 NinjaCross

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

NinjaCross avatar Jan 18 '22 16:01 NinjaCross

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

JSMonk avatar Feb 14 '22 08:02 JSMonk

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

NinjaCross avatar Feb 14 '22 08:02 NinjaCross

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

unrealsolver avatar Feb 14 '22 09:02 unrealsolver

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

NinjaCross avatar Mar 22 '22 09:03 NinjaCross

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 avatar Mar 22 '22 16:03 JSMonk

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

NinjaCross avatar Mar 22 '22 19:03 NinjaCross

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

trusktr avatar Jun 16 '22 05:06 trusktr

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

mindplay-dk avatar May 08 '23 08:05 mindplay-dk

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

JSMonk avatar May 13 '23 18:05 JSMonk

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

mindplay-dk avatar May 14 '23 08:05 mindplay-dk