Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid "Cannot read properties of undefined" #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Avoid "Cannot read properties of undefined" #28

wants to merge 1 commit into from

Conversation

sla100
Copy link

@sla100 sla100 commented Oct 7, 2021

Guard for:
DocGen TypeError: Cannot read properties of undefined (reading 'map')

Guard for:
`DocGen TypeError: Cannot read properties of undefined (reading 'map')`
@jcesarmobile
Copy link
Member

Hello.
When does this appear?
can you point me to a plugin that has this issue?

@ghost
Copy link

ghost commented Jun 24, 2022

this occurs when "files" https://github.com/capacitor-community/bluetooth-le/blob/main/tsconfig.json#L19 is changed to "include": ["src"] for when example when i ran into it. I wasn't familiar with this docgen program, so i didn't realize it expected "files" explicitly. The suggested fix seems like it is a workaround rather than a real fix.

@sebastianricaldoni
Copy link

Hi amazing CapacitorJS team (and ionic-team 🤗 ), Any chances this pr can get merged? I had to do exactly the same thing with my tsconfig.json file because for some odd reason tsc was only transpiling src/index.ts and ignoring src/definitions.ts and src/web/ts. My work around was to replace

"files": ["src/index.ts"]

with

  "include": ["src/*"]

and then running npm run build started to fail when running DocGen

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants