Webiny-js: Webiny Create fails with unhandled promise rejection

Created on 23 Jan 2020  ·  6Comments  ·  Source: webiny/webiny-js

When trying to create a webiny project, the project fails to completely install.

This is:

  • Bug

Specifications

  • version: 2.6.0
  • OS: WSL (Ubuntu 18.04.3 LTS)
  • Browser: Firefox

Expected Behavior

webiny successfully creates project.

Actual Behavior

webiny create fails to complete or exits, returning the following error before completing.

`Webiny collects anonymous usage analytics to help improve the developer experience.
If you'd like to opt-out run webiny disable-tracking.
To learn more, check out https://www.webiny.com/telemetry/.

�📦 Creating a new Webiny project in /mnt/c/Users/tjrex/Documents/Repos/open-autism/website..
✔ Finished loading package versions
⠇ Installing dependencies...(node:1593) UnhandledPromiseRejectionWarning: TypeError: util.getSystemErrorName is not a function
at getCode (/usr/local/lib/node_modules/@webiny/cli/node_modules/execa/lib/error.js:11:16)
at makeError (/usr/local/lib/node_modules/@webiny/cli/node_modules/execa/lib/error.js:50:35)
at handlePromise (/usr/local/lib/node_modules/@webiny/cli/node_modules/execa/index.js:112:26)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:1593) 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(). (rejection id: 1)
(node:1593) [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.`

Steps to Reproduce the Problem

  1. npm -g install @webiny/cli
  2. cd to directory to create project
  3. webiny create website

Possible Solution

I tried to manually install the apps/admin package independently by using yarn install, and I received the following error:
error [email protected]: The engine "node" is incompatible with this module. Expected version "^8.12.0 || >=9.7.0". Got "8.10.0" error Found incompatible module.

Installing with npm resulted with the following errors
npm ERR! No compatible version found: theme@^1.0.0

Most helpful comment

@Pavel910 that solved it, was running v8.10 as that's what was available through default package managers. Updated to current release v13.7 and that succeeded. Might be worth adding a version check for nodejs on create to at least require minimum that you're running.

Not going to close the issue in case you want to add that as an enhancement.

All 6 comments

Did you try installing a newer version of node? Using yarn may have given you a more detailed error the first time because or the whole yarn-workspace/lerna thing?

Hey @tjrexer, to be honest, we're running everything on node ^10.14 locally, so maybe try installing at least that? A greater version should also work, but try at least 10.14.

Btw. a great tool to manage you node versions and switch them instantly is https://www.npmjs.com/package/n.

Let us know how it goes :)

@Pavel910 that solved it, was running v8.10 as that's what was available through default package managers. Updated to current release v13.7 and that succeeded. Might be worth adding a version check for nodejs on create to at least require minimum that you're running.

Not going to close the issue in case you want to add that as an enhancement.

Great! Actually we did have a check, but it was for node 8.10; updated it for the upcoming release 👍

@Pavel910 can we close this?

Yep; closing.

Was this page helpful?
0 / 5 - 0 ratings