create-nx-workspace does not finish successfully
See original GitHub issueCurrent Behavior
When I run npx create-nx-workspace@12.0.0 and put in the setup inputs, I get errors and a workspace that is in an incomplete state.
Expected Behavior
I get a usable NX workspace
Steps to Reproduce
Not sure how I can provide steps here. My inputs are in the above logs. I have had coworkers run this with no issues.
Failure Logs
npx create-nx-workspace@12.0.0
✔ Workspace name (e.g., org name) · myorg
✔ What to create in the new workspace · angular
✔ Application name · todos
✔ Default stylesheet format · scss
✔ Default linter · eslint
✔ Use Nx Cloud? (It's free and doesn't require registration.) · No
> NX Nx is creating your workspace.
To make sure the command works reliably in all environments, and that the preset is applied correctly,
Nx will run "npm install" several times. Please wait.
⠸ Creating your workspace
> NX ERROR Something went wrong. Rerunning the command with verbose logging.
Failed to format: myorg/angular.json
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
at new NodeError (node:internal/errors:329:5)
at Function.from (node:buffer:323:9)
at FsTree.write (/private/var/folders/z2/91rnsz4d4mx_7rfrd4y3gv1xw9472q/T/tmp-10878QqT9dilKJj3W/node_modules/@nrwl/tao/src/shared/tree.js:35:20)
at writeJson (/private/var/folders/z2/91rnsz4d4mx_7rfrd4y3gv1xw9472q/T/tmp-10878QqT9dilKJj3W/node_modules/@nrwl/devkit/src/utils/json.js:32:10)
at Object.updateJson (/private/var/folders/z2/91rnsz4d4mx_7rfrd4y3gv1xw9472q/T/tmp-10878QqT9dilKJj3W/node_modules/@nrwl/devkit/src/utils/json.js:44:5)
at formatWorkspaceJson (/private/var/folders/z2/91rnsz4d4mx_7rfrd4y3gv1xw9472q/T/tmp-10878QqT9dilKJj3W/node_modules/@nrwl/workspace/src/generators/workspace/workspace.js:53:18)
at Object.<anonymous> (/private/var/folders/z2/91rnsz4d4mx_7rfrd4y3gv1xw9472q/T/tmp-10878QqT9dilKJj3W/node_modules/@nrwl/workspace/src/generators/workspace/workspace.js:78:9)
at Generator.next (<anonymous>)
at fulfilled (/private/var/folders/z2/91rnsz4d4mx_7rfrd4y3gv1xw9472q/T/tmp-10878QqT9dilKJj3W/node_modules/tslib/tslib.js:114:62) {
code: 'ERR_INVALID_ARG_TYPE'
}
UPDATE myorg/.vscode/extensions.json
UPDATE myorg/angular.json
UPDATE myorg/nx.json
UPDATE myorg/package.json
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@angular-devkit/architect@0.1102.8',
npm WARN EBADENGINE required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE current: { node: 'v15.8.0', npm: '7.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@angular-devkit/core@11.2.8',
npm WARN EBADENGINE required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE current: { node: 'v15.8.0', npm: '7.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@angular-devkit/schematics@11.2.8',
npm WARN EBADENGINE required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE current: { node: 'v15.8.0', npm: '7.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@angular/cli@11.2.8',
npm WARN EBADENGINE required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE current: { node: 'v15.8.0', npm: '7.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@schematics/angular@11.2.8',
npm WARN EBADENGINE required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE current: { node: 'v15.8.0', npm: '7.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@schematics/update@0.1102.8',
npm WARN EBADENGINE required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE current: { node: 'v15.8.0', npm: '7.5.1' }
npm WARN EBADENGINE }
> myorg@0.0.0 postinstall
> node ./decorate-angular-cli.js
> NX Angular CLI has been decorated to enable computation caching.
removed 1447 packages, and audited 743 packages in 7s
56 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
MergeConflictException [Error]: A merge conflicted on path "/apps/todos/tsconfig.editor.json".
at /Users/trogers/repos/myorg/node_modules/@angular-devkit/schematics/src/tree/host-tree.js:142:35
at Array.forEach (<anonymous>)
at HostTree.merge (/Users/trogers/repos/myorg/node_modules/@angular-devkit/schematics/src/tree/host-tree.js:131:23)
at MapSubscriber.project (/Users/trogers/repos/myorg/node_modules/@angular-devkit/schematics/src/rules/base.js:54:91)
at MapSubscriber._next (/Users/trogers/repos/myorg/node_modules/rxjs/internal/operators/map.js:49:35)
at MapSubscriber.Subscriber.next (/Users/trogers/repos/myorg/node_modules/rxjs/internal/Subscriber.js:66:18)
at TapSubscriber._next (/Users/trogers/repos/myorg/node_modules/rxjs/internal/operators/tap.js:65:26)
at TapSubscriber.Subscriber.next (/Users/trogers/repos/myorg/node_modules/rxjs/internal/Subscriber.js:66:18)
at ThrowIfEmptySubscriber._next (/Users/trogers/repos/myorg/node_modules/rxjs/internal/operators/throwIfEmpty.js:44:26)
at ThrowIfEmptySubscriber.Subscriber.next (/Users/trogers/repos/myorg/node_modules/rxjs/internal/Subscriber.js:66:18)
A merge conflicted on path "/apps/todos/tsconfig.editor.json".
npm ERR! code 1
npm ERR! path /Users/trogers/repos/myorg
npm ERR! command failed
npm ERR! command sh -c ng "g" "@nrwl/workspace:preset" "--name=todos" "--style=scss" "--linter=eslint" "--npmScope=myorg" "--preset=angular" "--cli=ng" "--interactive=false"
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/trogers/.npm/_logs/2021-04-08T22_06_39_069Z-debug.log
Workspace creation failed, see above.
npm ERR! code 1
npm ERR! path /private/var/folders/z2/91rnsz4d4mx_7rfrd4y3gv1xw9472q/T/tmp-10878QqT9dilKJj3W
npm ERR! command failed
npm ERR! command sh -c tao "new" "myorg" "--no-interactive" "--preset=angular" "--appName=todos" "--style=scss" "--linter=eslint" "--no-nxCloud" "--collection=@nrwl/workspace/collection.json" "--cli=angular" "--nxWorkspaceRoot=/Users/trogers/repos"
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/trogers/.npm/_logs/2021-04-08T22_06_39_137Z-debug.log
> NX ERROR Something went wrong! v12.0.0
node:child_process:681
err = new Error(msg);
^
Error: Command failed: npx tao new myorg --no-interactive --preset=angular --appName=todos --style=scss --linter=eslint --no-nxCloud --collection=@nrwl/workspace/collection.json --cli=angular --nxWorkspaceRoot="/Users/trogers/repos"
at checkExecSyncError (node:child_process:681:11)
at Object.execSync (node:child_process:718:15)
at /Users/trogers/.npm/_npx/12837211e1e52e16/node_modules/create-nx-workspace/bin/create-nx-workspace.js:449:29
at Generator.throw (<anonymous>)
at rejected (/Users/trogers/.npm/_npx/12837211e1e52e16/node_modules/tslib/tslib.js:115:69) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 12282,
stdout: null,
stderr: null
}
npm ERR! code 1
npm ERR! path /Users/trogers/repos
npm ERR! command failed
npm ERR! command sh -c create-nx-workspace
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/trogers/.npm/_logs/2021-04-08T22_06_39_212Z-debug.log
Environment
Mac OSX 10.15.7 Node 15.8.0 (I have tried 10.15.0, 10.24.1, and 14.16.0 too) npm 7.5.1 nvm 0.37.2 zsh shell
There is no node packages installed where I am running the command, no old local packages being used over global. Only global install is npm. (npm list -g --depth 0)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:9
Top Results From Across the Web
Troubleshoot a WorkSpace stuck in starting, rebooting, or ...
My Amazon WorkSpaces Windows WorkSpace is stuck in the starting, rebooting, or stopping status. Why is this happening, and how can I fix ......
Read more >Installation issues - Google Workspace Admin Help
Installations usually are unsuccessful because the version of Microsoft Windows or Outlook doesn't meet the system requirements. Review the system requirements, ...
Read more >Manage Workspace - Grants.gov
There are five main steps to successfully submitting a grant application in a workspace: Created: The act of creating a workspace to apply...
Read more >Repair Local Visual Studio TFS Workspace Mapping
I've fixed my issue where Visual Studio was unable to open Source Control Explorer and Workspaces/Manage Workspaces dialogue by deleting the ...
Read more >Troubleshooting Windows Devices: Workspace ONE ...
Note: This content was created for Windows 10, but the basic principles and tasks ... issues with apps and Windows Updates not downloading...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Not my issue. I have tried in bash and zsh instances. Also tried restarting them and my computer. Always have the above logs
Somehow it’s connected with environment, I guess. I faced same issue many times. The only thing which helps is to close terminal (shell) and start new one (or new session).