ionic-team / capacitor-docgen

Docs Readme Markdown and JSON Generator for Capacitor Plugins.
https://capacitorjs.com/
Other
12 stars 8 forks source link

Avoid "Cannot read properties of undefined" #28

Open sla100 opened 3 years ago

sla100 commented 3 years ago

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

jcesarmobile commented 2 years ago

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

ghost commented 2 years ago

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 commented 7 months ago

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!!

oliveryasuna commented 2 months ago

This would be very useful. Please consider merging!