Skip to content
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

Unable to create a new workspace using yarn/npm #28289

Closed
nvinay-litmus7 opened this issue Oct 4, 2024 · 3 comments · Fixed by #29122
Closed

Unable to create a new workspace using yarn/npm #28289

nvinay-litmus7 opened this issue Oct 4, 2024 · 3 comments · Fixed by #29122
Assignees
Labels
outdated scope: core core nx functionality

Comments

@nvinay-litmus7
Copy link

Error creating a workspace using yarn.

npx create-nx-workspace --pm yarn
NX   Let's create a new workspace [https://nx.dev/getting-started/intro]

✔ Where would you like to create your workspace? · Org
✔ Which stack do you want to use? · react
✔ What framework would you like to use? · react-native
✔ Application name · mobile
✔ Test runner to use for end to end (E2E) tests · playwright
✔ Which CI provider would you like to use? · skip
✔ Would you like remote caching to make your build faster? · yes
✔ Will you be using GitHub as your git hosting provider? · Yes

 NX   Creating your v19.8.3 workspace.

✔ Installing dependencies with yarn
✖ Creating your workspace in Org

 NX   Failed to create a workspace.

Exit code: 1
Log file: /var/folders/1m/sv50vh4s6l5fkn_hq_9g_xn00000gp/T/tmp-79467-08gEWEIyk7Si/error.log

And my error log looks like this

yarn run v1.22.22
$ /private/var/folders/1m/sv50vh4s6l5fkn_hq_9g_xn00000gp/T/tmp-79467-08gEWEIyk7Si/node_modules/.bin/nx new --pm=yarn --packageManager=yarn --interactive --standaloneApi --routing --no-skipGit --no-g '--commit.message=Initial commit' --no-allPrompts --no-a --useGitHub --/bin/sh=/Users/n.vinay/.npm/_npx/d2207cf76adb22dc/node_modules/.bin/create-nx-workspace --name=Org --stack=react --preset=react-native --appName=mobile --no-nextAppDir --no-nextSrcDir --e2eTestRunner=playwright --nxCloud=yes --defaultBase=main --nxWorkspaceRoot=/Users/n.vinay/Work/Monorepo
Resolving 1.22.22 to a url...
Downloading https://github.com/yarnpkg/yarn/releases/download/v1.22.22/yarn-1.22.22.js...
Saving it into /Users/n.vinay/Work/Monorepo/Org/.yarn/releases/yarn-1.22.22.cjs...
Updating /Users/n.vinay/Work/Monorepo/Org/.yarnrc...
Done!
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
$ /Users/n.vinay/Work/Monorepo/Org/node_modules/.bin/nx g @nx/workspace:preset --name=mobile --style=css --linter=eslint --preset=react-native --nextAppDir=false --nextSrcDir=false --packageManager=yarn --standaloneApi=true --interactive=true --routing=true --e2eTestRunner=playwright --nxCloudToken=66ff7c5b6e46622bb2fb2b37

 NX  Generating @nx/workspace:preset

Fetching prettier...
Fetching @nx/webpack...

 NX   Unable to read the target configuration for the provided build target, mobile:build

Are you sure this target exists?
Pass --verbose to see the stacktrace.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

 NX   Workspace creation failed, see above.

Pass --verbose to see the stacktrace.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

warning @nx/react-native > [email protected]: Glob versions prior to v9 are no longer supported
warning @nx/react-native > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
warning @nx/react-native > @nx/jest > @jest/reporters > [email protected]: Glob versions prior to v9 are no longer supported
warning @nx/react-native > @nx/jest > @jest/reporters > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
warning @nx/react-native > @nx/jest > jest-config > [email protected]: Glob versions prior to v9 are no longer supported
warning @nx/react-native > @nx/jest > jest-config > jest-runner > jest-runtime > [email protected]: Glob versions prior to v9 are no longer supported
warning @nx/react-native > @nx/jest > @jest/reporters > @jest/transform > babel-plugin-istanbul > test-exclude > [email protected]: Glob versions prior to v9 are no longer supported
warning "@nx/react-native > @nx/js > [email protected]" has unmet peer dependency "@types/node@*".
warning "@nx/react-native > @nx/js > [email protected]" has unmet peer dependency "typescript@>=2.7".
warning "@nx/react-native > @nx/jest > @phenomnomnominal/[email protected]" has unmet peer dependency "typescript@^3 || ^4 || ^5".
warning "@nx/react-native > @nx/react > [email protected]" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
warning "@nx/react-native > @nx/[email protected]" has unmet peer dependency "eslint@^8.0.0 || ^9.0.0".
warning "@nx/react-native > @nx/react > @module-federation/enhanced > @module-federation/[email protected]" has unmet peer dependency "typescript@^4.9.0 || ^5.0.0".
warning "@nx/react-native > @nx/react > @module-federation/enhanced > @module-federation/[email protected]" has unmet peer dependency "react@>=16.9.0".
warning "@nx/react-native > @nx/react > @module-federation/enhanced > @module-federation/[email protected]" has unmet peer dependency "react-dom@>=16.9.0".
error Command failed with exit code 1.
error Command failed with exit code 1.

Originally posted by @nvinay-litmus7 in #28235

@nvinay-litmus7 nvinay-litmus7 changed the title Unable to create a new workspace using Unable to create a new workspace using yarn/npm Oct 4, 2024
@WTPOptAxe
Copy link

Adding to this - if end-to-end test frameworks are disabled, then this create works correctly.

@jaysoo jaysoo self-assigned this Oct 14, 2024
@jaysoo jaysoo added the scope: core core nx functionality label Oct 14, 2024
@airowe
Copy link

airowe commented Oct 14, 2024

Seeing the same as well

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: core core nx functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants