Please answer the following questions for yourself before submitting an issue.
Should create a new Workspace
I am using Win10 64 Bit,
Tried with powershell and git bash
I allways got an error
npx create-nx-workspace@latest ProjectName
npx: installed 169 in 25.87s
? What to create in the new workspace empty [an empty workspace]
? CLI to power the Nx workspace Angular CLI [Extensible CLI for Angular applications. Recommended for Angular pro
jects.]
Creating a sandbox with Nx...
error An unexpected error occurred: "%27%27/@nrwl%2fworkspace: Invalid URI "%27%27/@nrwl%2fworkspace"".
(node:17844) UnhandledPromiseRejectionWarning: Error: Command failed: yarn install --silent
at checkExecSyncError (child_process.js:621:11)
at Object.execSync (child_process.js:657:15)
at createSandbox (C:UsersNameAppDataRoamingnpm-cache_npx17844node_modulescreate-nx-workspacebincreate-nx-workspace.js:337:21)
at C:UsersNameAppDataRoamingnpm-cache_npx17844node_modulescreate-nx-workspacebincreate-nx-workspace.js:74:36
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:17844) 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:17844) [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.
If you can provide steps to reproduce from scratch, that would be enormously appreciated (i.e. where the first step is npx create-nx-workspace@latest repro-workspace)
npx create-nx-workspace@latest ProjectName
Please provide any relevant information about your setup:
node: v12.13.0,
npm: 6.13.6
Win 10 64Bit
Getting the same issue on:
node: v12.16.1
npm: 6.14.0
Ubuntu Linux
Creating a sandbox with Nx...
warning @angular/cli > universal-analytics > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
error @angular-devkit/[email protected]: The engine "yarn" is incompatible with this module. Expected version ">= 1.13.0".
error Found incompatible module
(node:8034) UnhandledPromiseRejectionWarning: Error: Command failed: yarn install --silent
at checkExecSyncError (child_process.js:630:11)
at Object.execSync (child_process.js:666:15)
at createSandbox (.../.npm/_npx/8034/lib/node_modules/create-nx-workspace/bin/create-nx-workspace.js:317:21)
at .../.npm/_npx/8034/lib/node_modules/create-nx-workspace/bin/create-nx-workspace.js:75:36
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:8034) 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:8034) [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.
Little hint: My workaround was to remove my global yarn installation.
@gussi77 what version of yarn are you using?
@metrophos you could also update the version of yarn to >= 1.13.
Updating my global Yarn package fixed it for me as @vsavkin suggested.
npm install -g yarn@latest
My problem was yarn global list revealed a deprecated "@angular/[email protected]" - I updated the the latest and it worked.
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.
Most helpful comment
Little hint: My workaround was to remove my global yarn installation.