Skip to content

Workspace Creation Fails Due to License Field Warning with Yarn #28710

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

Closed
1 of 4 tasks
profitsky opened this issue Oct 30, 2024 · 3 comments · Fixed by #29122
Closed
1 of 4 tasks

Workspace Creation Fails Due to License Field Warning with Yarn #28710

profitsky opened this issue Oct 30, 2024 · 3 comments · Fixed by #29122

Comments

@profitsky
Copy link

Current Behavior

Error: warning ../../../../package.json: No license field
error Command failed with exit code 1

Expected Behavior

The Nx workspace should be successfully created without errors.

GitHub Repo

No response

Steps to Reproduce

  1. Run npx create-nx-workspace --pm yarn.
  2. Choose:
    -Directory for workspace: vvvv
    -Stack: none
    -Prettier: No
    -CI provider: GitHub
  3. Nx begins creating the workspace but fails with an error.

Nx Report

NX Report complete - copy this into the issue template

Node : x.x.x
OS : Your Operating System Info
yarn : x.x.x

nx : x.x.x
@nrwl/angular : Not Found
@nrwl/cypress : Not Found
@nrwl/detox : Not Found
@nrwl/devkit : x.x.x
@nrwl/eslint-plugin-nx : x.x.x
@nrwl/express : Not Found
@nrwl/jest : Not Found
@nrwl/js : x.x.x
@nrwl/linter : x.x.x
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : x.x.x
@nrwl/nx-cloud : Not Found
@nrwl/react : Not Found
@nrwl/react-native : Not Found
@nrwl/rollup : x.x.x
@nrwl/storybook : Not Found
@nrwl/web : Not Found
@nrwl/workspace : x.x.x
typescript : x.x.x

Failure Logs

No response

Package Manager Version

yarn: 1.22.19

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

This issue appears to be related to a warning about the missing license field in package.json. Ensuring the workspace creation process handles this warning or providing guidance on how to avoid this error would be helpful.

Thank you for looking into this!

@abebelagua
Copy link

I have the same issue, @profitsky you managed to fix the error

@profitsky
Copy link
Author

I have the same issue, @profitsky you managed to fix the error

unfortunately no

Copy link

github-actions bot commented Jan 3, 2025

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 3, 2025
isaacplmann pushed a commit that referenced this issue Feb 11, 2025
## Current Behavior
On Windows, when packageManager=pnpm, `create-nx-workspace` fails due to
an issue with `child_process.spawn`.
Using `spawn`, the `@nx/workspace:preset` generator is executed twice
when `packageManager=pnpm`, causing the overall create-nx-workspace flow
to fail, even though most things have been set up correctly to that
point.

Using `fork` has shown success.

## Expected Behavior
Running `create-nx-workspace --packageManager=pnpm` should work on
Windows

## Fixes
Fixes #20222 
Fixes #27270 
Fixes #22917 
Fixes #22312 
Fixes #28710 
Fixes #28289 
Fixes #28235 
Fixes #22383 
Fixes #21742 
Fixes #20270
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants