X Tutup
The Wayback Machine - https://web.archive.org/web/20201028100827/https://github.com/feathersjs/feathers/issues/2108
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

Feathers generate hook: UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'files' of undefined #2108

Open
Dahkenangnon opened this issue Oct 24, 2020 · 0 comments

Comments

@Dahkenangnon
Copy link

@Dahkenangnon Dahkenangnon commented Oct 24, 2020

Steps to reproduce

I have run the command: feathers generate hook

Expected behavior

Generating new hook

Actual behavior

(Move up and down to reveal more choices)
PS C:\Users\Dah-kenangnon\Music\e\apps\main\e_api> ^C
PS C:\Users\Dah-kenangnon\Music\e\apps\main\e_api> feathers generate hook
(node:16344) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'files' of undefined
at subloop (C:\Users\Dah-kenangnon\AppData\Roaming\npm\node_modules@feathersjs\cli\node_modules\node-dir\lib\paths.js:92:58)
at C:\Users\Dah-kenangnon\AppData\Roaming\npm\node_modules@feathersjs\cli\node_modules\node-dir\lib\paths.js:107:13
at onDirRead (C:\Users\Dah-kenangnon\AppData\Roaming\npm\node_modules@feathersjs\cli\node_modules\node-dir\lib\paths.js:139:35)
at onStat (C:\Users\Dah-kenangnon\AppData\Roaming\npm\node_modules@feathersjs\cli\node_modules\node-dir\lib\paths.js:154:14)
at Object.files (C:\Users\Dah-kenangnon\AppData\Roaming\npm\node_modules@feathersjs\cli\node_modules\node-dir\lib\paths.js:162:12)
at HookGenerator._listServices (C:\Users\Dah-kenangnon\AppData\Roaming\npm\node_modules@feathersjs\cli\node_modules\generator-feathers\generators\hook\index.js:11:23)
at HookGenerator.prompting (C:\Users\Dah-kenangnon\AppData\Roaming\npm\node_modules@feathersjs\cli\node_modules\generator-feathers\generators\hook\index.js:94:27)
at Object. (C:\Users\Dah-kenangnon\AppData\Roaming\npm\node_modules@feathersjs\cli\node_modules\yeoman-generator\lib\index.js:976:25)
at C:\Users\Dah-kenangnon\AppData\Roaming\npm\node_modules@feathersjs\cli\node_modules\run-async\index.js:49:25
at new Promise ()
at C:\Users\Dah-kenangnon\AppData\Roaming\npm\node_modules@feathersjs\cli\node_modules\run-async\index.js:26:19
at runLoop.add.once.once (C:\Users\Dah-kenangnon\AppData\Roaming\npm\node_modules@feathersjs\cli\node_modules\yeoman-generator\lib\index.js:977:11)
at processImmediate (internal/timers.js:456:21)
(node:16344) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled
promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode).
(rejection id: 2)
(node:16344) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
PS C:\Users\Dah-kenangnon\Music\e\apps\main\e_api>

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working):

The error occured when i ran: feathers generate hook.

"@feathersjs/authentication": "^4.5.8",
  "@feathersjs/authentication-local": "^4.5.8",
  "@feathersjs/authentication-oauth": "^4.5.8",
  "@feathersjs/configuration": "^4.5.8",
  "@feathersjs/errors": "^4.5.8",
  "@feathersjs/express": "^4.5.8",
  "@feathersjs/feathers": "^4.5.8",
  "@feathersjs/socketio": "^4.5.8",
  "@feathersjs/transport-commons": "^4.5.8",

NodeJS version: v12.18.3 && npm: 6.14.6

Operating System: Windows 10

Module Loader: default on browser

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

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.
X Tutup