Skip to content

UnhandledPromiseRejectionWarning when running htmlgoddess print from incorrect folder #52

@jsheth7

Description

@jsheth7

If you run htmlgoddess print from a folder outside of your htmlgoddess directory, you get this error:

(node:13559) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'getHooks' of undefined at /usr/local/lib/node_modules/@htmlgoddess/cli/node_modules/@htmlgoddess/webpack-plugin/plugin.js:92:25 at SyncHook.eval [as call] (eval at create (/usr/local/lib/node_modules/@htmlgoddess/cli/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:5:1) at SyncHook.lazyCompileHook (/usr/local/lib/node_modules/@htmlgoddess/cli/node_modules/tapable/lib/Hook.js:154:20) at Compiler.newCompilation (/usr/local/lib/node_modules/@htmlgoddess/cli/node_modules/webpack/lib/Compiler.js:631:26) at /usr/local/lib/node_modules/@htmlgoddess/cli/node_modules/webpack/lib/Compiler.js:667:29 at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/local/lib/node_modules/@htmlgoddess/cli/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:4:1) at AsyncSeriesHook.lazyCompileHook (/usr/local/lib/node_modules/@htmlgoddess/cli/node_modules/tapable/lib/Hook.js:154:20) at Compiler.compile (/usr/local/lib/node_modules/@htmlgoddess/cli/node_modules/webpack/lib/Compiler.js:662:28) at /usr/local/lib/node_modules/@htmlgoddess/cli/node_modules/webpack/lib/Compiler.js:321:11 at Compiler.readRecords (/usr/local/lib/node_modules/@htmlgoddess/cli/node_modules/webpack/lib/Compiler.js:529:11) at /usr/local/lib/node_modules/@htmlgoddess/cli/node_modules/webpack/lib/Compiler.js:318:10 at eval (eval at create (/usr/local/lib/node_modules/@htmlgoddess/cli/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1) at /usr/local/lib/node_modules/@htmlgoddess/cli/node_modules/webpack/lib/CachePlugin.js:50:13 at AsyncSeriesHook.eval [as callAsync] (eval at create (/usr/local/lib/node_modules/@htmlgoddess/cli/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:5:1) at AsyncSeriesHook.lazyCompileHook (/usr/local/lib/node_modules/@htmlgoddess/cli/node_modules/tapable/lib/Hook.js:154:20) at /usr/local/lib/node_modules/@htmlgoddess/cli/node_modules/webpack/lib/Compiler.js:315:19 (node:13559) 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: 1) (node:13559) [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. Printing your website from /path/to/src to /path/to/docs... done

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions