hegel icon indicating copy to clipboard operation
hegel copied to clipboard

Cannot use 'in' operator to search for 'start' in undefined

Open easoncxz opened this issue 5 years ago • 1 comments

I don't have a minimal reproduction yet, but it seems to be related to the interpretation of .hegelrc file.

If in .hegelrc I put:

environment: browser
include:
  - ./src/**/*.js
exclude:
  - ./static/**
  - ./es5/**
  - ./node_modules/**
types:
  - ./@types
  - ./node_modules/@types

and run npx hegel, I get:

[0] $ npx hegel
Cannot use 'in' operator to search for 'start' in undefined

[1] $

However if I add a bogus entry to include: at the start, like bogus.js here:

environment: browser
include:
  - bogus.js
  - ./src/**/*.js
exclude:
  - ./static/**
  - ./es5/**
  - ./node_modules/**
types:
  - ./@types
  - ./node_modules/@types

Then type-checking is fine:

[0] $ npx hegel
No errors!

[0] $

I found #102, but not sure how related it is.

easoncxz avatar Aug 23 '20 15:08 easoncxz

Hmm. It seems like an inner problem inside code base. Will try to reproduce it. Thank you for your contributions. You help us a lot and you are awesome :3

JSMonk avatar Sep 06 '20 21:09 JSMonk