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

Fix unhandled promise rejection on server.open #1234

Merged
merged 4 commits into from
Aug 26, 2020
Merged

Fix unhandled promise rejection on server.open #1234

merged 4 commits into from
Aug 26, 2020

Conversation

JosefBredereck
Copy link
Contributor

Closes #1231

Summary of changes:

In a docker container with no browser installed, an unhandled promise rejection occured when pl:serve tried to open pattern lab in a browser.

@JosefBredereck JosefBredereck changed the title #1231: Fix unhandled promise rejection on server.open Fix unhandled promise rejection on server.open Aug 16, 2020
@coveralls
Copy link

coveralls commented Aug 25, 2020

Coverage Status

Coverage remained the same at 74.386% when pulling 5ef46ee on fix-1231 into fe3fd8d on dev.

Copy link
Contributor

@sghoweri sghoweri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@fgm
Copy link

fgm commented Sep 5, 2020

Any reason npm create still uses 5.12.0 ? NPMJS doesn't carry create-pattern-lab 5.13.0 yet. Also, when manually installing @pattern-lab/cli 5.13.0 in an empty directory (macOS Mojave):

  • doing npx pattern-lab init crashes with env: node\r: No such file or directory. Apparently caused by the file being in Windows CRLF format instead of *nix LF format
  • doing node node_modules/.bin/pattern-lab init to avoid the CRLF issue still emits this deprecation warning about unhandled promise rejection:
$ patternlab install --config ./patternlab-config.json
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

    at makeError (/Users/fgm/src/OSInet/fr/osinet/osinet9/static/plab/node_modules/execa/index.js:172:9)
    at /Users/fgm/src/OSInet/fr/osinet/osinet9/static/plab/node_modules/execa/index.js:277:16
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:15124) 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:15124) [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.
⠏ ⊙ patternlab → Installing starterkit @pattern-lab/starterkit-twig-demo

It then remains (indefinitely ?) on that last line, with the node process no longer eating any CPU, so apparently stuck.

@JosefBredereck
Copy link
Contributor Author

Oh, yes. I had no access rights to the npm package but I should now have. I will change that today. Very good hint.

@JosefBredereck
Copy link
Contributor Author

Also, your error message looks more like #916, where an error occurs during installation.

antonia-rose pushed a commit to quelltexterin/nemo-uikit-workshop that referenced this pull request Apr 12, 2023
Fix unhandled promise rejection on server.open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UnhandledPromiseRejectionWarning when serving fresh installation
4 participants