question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npx create-nx-workspace@latest fails on project scaffolding

See original GitHub issue

Current Behavior

$ npx create-nx-workspace@latest troyweb
npx: installed 179 in 15.407s
? What to create in the new workspace angular-nest      [a workspace with a full stack application (Angular + Nest)]
? Application name                    project-jump-start
? Default stylesheet format           SASS(.scss)  [ http://sass-lang.com   ]
? Use Nx Cloud? (It's free and doesn't require registration.) No
Creating a sandbox with Nx...
error @angular-devkit/architect@0.1000.8: The engine "yarn" is incompatible with this module. Expected version ">= 1.13.0".
error Found incompatible module
(node:31432) UnhandledPromiseRejectionWarning: Error: Command failed: yarn install --silent
    at checkExecSyncError (child_process.js:630:11)
    at Object.execSync (child_process.js:666:15)
    at createSandbox (C:\Users\Tyler\AppData\Roaming\npm-cache\_npx\31432\node_modules\create-nx-workspace\bin\create-nx-workspace.js:341:21)
    at C:\Users\Tyler\AppData\Roaming\npm-cache\_npx\31432\node_modules\create-nx-workspace\bin\create-nx-workspace.js:90:40
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:31432) 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:31432) [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.
$ npm init nx-workspace troyweb
npx: installed 179 in 14.208s
? What to create in the new workspace angular-nest      [a workspace with a full stack application (Angular + Nest)]
? Application name                    project-jump-start
? Default stylesheet format           SASS(.scss)  [ http://sass-lang.com   ]
? Use Nx Cloud? (It's free and doesn't require registration.) Yes [Faster builds, run details, Github integration. Learn more at https://nx.app]
Creating a sandbox with Nx...
error @angular-devkit/architect@0.1000.8: The engine "yarn" is incompatible with this module. Expected version ">= 1.13.0".
error Found incompatible module
(node:41924) UnhandledPromiseRejectionWarning: Error: Command failed: yarn install --silent
    at checkExecSyncError (child_process.js:630:11)
    at Object.execSync (child_process.js:666:15)
    at createSandbox (C:\Users\Tyler\AppData\Roaming\npm-cache\_npx\3908\node_modules\create-nx-workspace\bin\create-nx-workspace.js:341:21)
    at C:\Users\Tyler\AppData\Roaming\npm-cache\_npx\3908\node_modules\create-nx-workspace\bin\create-nx-workspace.js:90:40
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:41924) 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:41924) [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.
$ create-nx-workspace
? Workspace name (e.g., org name)     troyweb
? What to create in the new workspace angular-nest      [a workspace with a full stack application (Angular + Nest)]
? Application name                    project-jump-start
? Default stylesheet format           SASS(.scss)  [ http://sass-lang.com   ]
? Use Nx Cloud? (It's free and doesn't require registration.) Yes [Faster builds, run details, Github integration. Learn more at https://nx.app]
Creating a sandbox with Nx...
error @angular-devkit/architect@0.1000.8: The engine "yarn" is incompatible with this module. Expected version ">= 1.13.0".
error Found incompatible module
(node:39904) UnhandledPromiseRejectionWarning: Error: Command failed: yarn install --silent
    at checkExecSyncError (child_process.js:630:11)
    at Object.execSync (child_process.js:666:15)
    at createSandbox (C:\Users\Tyler\AppData\Roaming\npm\node_modules\create-nx-workspace\bin\create-nx-workspace.js:341:21)
    at C:\Users\Tyler\AppData\Roaming\npm\node_modules\create-nx-workspace\bin\create-nx-workspace.js:90:40
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:39904) 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:39904) [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

npx create-nx-workspace@latest npm init nx-workspace troyweb create-nx-workspace

Environment

Windows 10 Pro x64 npm bash

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
Tyler-Vcommented, Sep 23, 2020

Windows users, install this with powershell to avoid issues.

In my case, my yarn env was set to an incompatible version used in other projects thanks @Cammisuli

1reaction
bekoscommented, Nov 18, 2020

Indeed it seems that this was a problem with Yarn incompatibility. Since v10.4 the we default to NPM, unless --package-manager flag is used when creating a new workspace. I suppose this will solve your issue, but feel free to reopen in case there is a problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to create nx workspace - node.js - Stack Overflow
I am facing the same issue for resolving use below command for creating new workspace:- npx create-nx-workspace --preset=angular ...
Read more >
Integrated Repo Tutorial - Nx
This command: Uses the @nrwl/js plugin's library generator to scaffold a new library named is-even . The --publishable flag makes sure we also...
Read more >
Create a Next.js web app with Nx
In this article, we're going to explore how to create our very first web application with Next.js and Nx. We're going to learn...
Read more >
Using Nx Workspace generators to scaffold new blog posts
js page with the following command. npx nx generate @nrwl/next:page --name=slug --project=site --directory=articles. This particular generator ...
Read more >
nrwl-nx/community - Gitter
I created a new workspace and added 2 adds (nextjs, react-native-expo). ... command "npx create-nx-workspace@latest" and then choose angular I got the error....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found