Skip to content

updateProjectConfiguration fail with package.json configured projects #15595

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
edbzn opened this issue Mar 10, 2023 · 2 comments
Closed

updateProjectConfiguration fail with package.json configured projects #15595

edbzn opened this issue Mar 10, 2023 · 2 comments

Comments

@edbzn
Copy link
Contributor

edbzn commented Mar 10, 2023

Current Behavior

In the context of a generator, when projects are configured using package.json instead of project.json file, the devkit util function updateProjectConfiguration fails with the following error:

Cannot update project [name] at [path]. It doesn't exist or use package.json configuration.

Expected Behavior

I'm expecting this function to handle package.json based projects. Otherwise, what is the recommended way to handle this?

Thanks in advance.

GitHub Repo

No response

Steps to Reproduce

  1. setup a fresh monorepo with package.json projects based (no project.json)
  2. try to use updateProjectConfiguration to update those projects

Nx Report

Node : 16.18.1
   OS   : linux x64
   yarn : 3.4.1
   
   nx : 15.6.3
   @nrwl/angular : Not Found
   @nrwl/cypress : Not Found
   @nrwl/detox : Not Found
   @nrwl/devkit : 15.6.3
   @nrwl/esbuild : Not Found
   @nrwl/eslint-plugin-nx : 15.6.3
   @nrwl/expo : Not Found
   @nrwl/express : Not Found
   @nrwl/jest : 15.6.3
   @nrwl/js : 15.6.3
   @nrwl/linter : 15.6.3
   @nrwl/nest : Not Found
   @nrwl/next : Not Found
   @nrwl/node : Not Found
   @nrwl/nx-cloud : Not Found
   @nrwl/nx-plugin : 15.6.3
   @nrwl/react : Not Found
   @nrwl/react-native : Not Found
   @nrwl/rollup : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : Not Found
   @nrwl/web : Not Found
   @nrwl/webpack : Not Found
   @nrwl/workspace : 15.6.3
   @nrwl/vite : Not Found
   typescript : 4.9.5
   ---------------------------------------
   Local workspace plugins:
         @jscutlery/semver
   ---------------------------------------
   Community plugins:
         ngx-deploy-npm: 5.2.0

Failure Logs

No response

Additional Information

Related issue jscutlery/semver#634.

@AgentEnder
Copy link
Member

Package json based projects aren't handled by update project configuration, it is meant for project.json based projects only. If you want to support them, currently you'd need to do so with updateJson or similar.

@github-actions
Copy link

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 Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants