Describe the bug
When running bun install or npm install in a Nuxt project, the build process fails with 'Cannot read properties of undefined (reading "push")' errors. This occurs in the prepare:types and nitro:prepare:types hooks when nodeReferences, sharedReferences, or references arrays are undefined during destructuring.
Steps to reproduce
- Clone or set up a Nuxt project.
- Add the dependency
"@nuxtjs/kinde": "^0.3.0" to package.json
- Run
bun install or npm install
- The installation fails with error:
Cannot read properties of undefined (reading "push")
Expected behavior
Package installation should complete successfully without runtime errors.
Current behavior
Installation fails due to undefined reference arrays in the prepare:types hooks.
Additional context
This is a backward compatibility issue where the hooks don't provide default empty arrays, causing runtime errors when existing code tries to push to these arrays during the installation/build process.