You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
Running feathers generate hook gives me the following stack trace
TypeError: Cannot read property 'files' of undefined
at subloop (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:92:58)
at /Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:107:13
at onDirRead (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:139:35)
at onStat (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:154:14)
at files (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:162:12)
at /Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:104:29
at onDirRead (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:139:35)
at onStat (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:154:14)
at files (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:162:12)
at /Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:104:29
at onDirRead (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:139:35)
at onStat (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:154:14)
at Object.files (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:162:12)
at HookGenerator._listServices (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/generators/hook/index.js:11:23)
at HookGenerator.prompting (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/generators/hook/index.js:94:27)
at Object. (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/yeoman-generator/lib/index.js:438:23)
Emitted 'error' event on HookGenerator instance at:
at Immediate. (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/yeoman-generator/lib/index.js:451:18)
at processImmediate (internal/timers.js:439:21)
Expected behavior
It should show the normal prompt to enter hook details (name, before/after, etc).
Actual behavior
See stack trace. It noteworthy, that I used the feathers generate hook command succesfully before in this project.
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working):
feathers cli 4.2.5
NodeJS version: 13.1.0 via nvm
Operating System: MacOS Catalina
The text was updated successfully, but these errors were encountered:
Thank you. I can replicate the error as soon as I have an empty folder inside a service folder. Closing this as it is no real issue once you know about it. But I guess there is a recursive directory/file loop where a check if missing if the directory is empty.
Could just replicate the same issue. Was sure that I had a clean repo after a checkout, but an empty dir in src\services was causing the same error for me. Thanks for sharing the solution @florianbepunkt.
Steps to reproduce
Running feathers generate hook gives me the following stack trace
TypeError: Cannot read property 'files' of undefined
at subloop (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:92:58)
at /Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:107:13
at onDirRead (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:139:35)
at onStat (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:154:14)
at files (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:162:12)
at /Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:104:29
at onDirRead (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:139:35)
at onStat (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:154:14)
at files (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:162:12)
at /Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:104:29
at onDirRead (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:139:35)
at onStat (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:154:14)
at Object.files (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/node_modules/node-dir/lib/paths.js:162:12)
at HookGenerator._listServices (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/generators/hook/index.js:11:23)
at HookGenerator.prompting (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/generator-feathers/generators/hook/index.js:94:27)
at Object. (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/yeoman-generator/lib/index.js:438:23)
Emitted 'error' event on HookGenerator instance at:
at Immediate. (/Users/florian/.nvm/versions/node/v13.1.0/lib/node_modules/@feathersjs/cli/node_modules/yeoman-generator/lib/index.js:451:18)
at processImmediate (internal/timers.js:439:21)
Expected behavior
It should show the normal prompt to enter hook details (name, before/after, etc).
Actual behavior
See stack trace. It noteworthy, that I used the feathers generate hook command succesfully before in this project.
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working):
feathers cli 4.2.5
NodeJS version: 13.1.0 via nvm
Operating System: MacOS Catalina
The text was updated successfully, but these errors were encountered: