cli icon indicating copy to clipboard operation
cli copied to clipboard

Updated but now cannot generate hook

Open OlagStegan opened this issue 3 years ago • 0 comments

As prompted, I updated feathers/cli on 2022-06-15 not having generated anything for over 2 weeks.

Expected behavior

Should produce the hook file and update the index as it used to

Actual behavior

Now running "feathers generate hook" just produces the following errors and no hook.

...npm\node_modules@feathersjs\cli\node_modules\node-dir\lib\paths.js:92 results.files = results.files.concat(res.files); ^ TypeError: Cannot read properties of undefined (reading 'files')
at subloop ...npm\node_modules@feathersjs\cli\node_modules\node-dir\lib\paths.js:92:58) at ...npm\node_modules@feathersjs\cli\node_modules\node-dir\lib\paths.js:107:13 at onDirRead ...npm\node_modules@feathersjs\cli\node_modules\node-dir\lib\paths.js:139:35) at onStat ...npm\node_modules@feathersjs\cli\node_modules\node-dir\lib\paths.js:154:14) at files ...npm\node_modules@feathersjs\cli\node_modules\node-dir\lib\paths.js:162:12) at ...npm\node_modules@feathersjs\cli\node_modules\node-dir\lib\paths.js:104:29 at onDirRead ...npm\node_modules@feathersjs\cli\node_modules\node-dir\lib\paths.js:139:35) at onStat ...npm\node_modules@feathersjs\cli\node_modules\node-dir\lib\paths.js:154:14) at Object.files ...npm\node_modules@feathersjs\cli\node_modules\node-dir\lib\paths.js:162:12) at HookGenerator._listServices ...\npm\node_modules@feathersjs\cli\node_modules\generator-feathers\generators\hook\index.js:11:23)

Now that looks like something in the hook generator is digging deeper into things than it should. I have tried as a test to "feathers generate service" and that appears to be working OK. I can, of course, just copy an existing hook and work from there, and have done so., but one of the nice features of feathers/cli is that it does this all for you ... or so it did.

removing the feathers/cli and re installing just produces the same errors so definitely a bug.

System configuration

Module versions current

NodeJS version: node v16.15.0

Operating System: windows v10 Home + VS Code

Browser Version: no browser involved - development

React Native Version: don't use it

Module Loader: yarn v1.22.15

I should add as of today (2022-06-24) feathers generate app also works with no errors, generate service also works but generate hook still breaks with the same errors as above - frustrating!

OlagStegan avatar Jun 19 '22 14:06 OlagStegan