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

Migration update-16-8-0-add-ignored-files is failing #19020

Closed
1 of 4 tasks
C0ZEN opened this issue Sep 6, 2023 · 4 comments · Fixed by #19026
Closed
1 of 4 tasks

Migration update-16-8-0-add-ignored-files is failing #19020

C0ZEN opened this issue Sep 6, 2023 · 4 comments · Fixed by #19026
Assignees
Labels
outdated scope: linter Issues related to Eslint support in Nx type: bug

Comments

@C0ZEN
Copy link

C0ZEN commented Sep 6, 2023

Current Behavior

Migrating from Nx 16.7 to 16.8, and running the migration update-16-8-0-add-ignored-files is not working.

The log error is:

 >  NX   Failed to run update-16-8-0-add-ignored-files from @nx/linter. This workspace is NOT up to date!
 >  NX   Cannot find apps/{project-name}/.eslintrc.json

Note that I don't have an .eslintrc.json, but instead a .eslintrc.js.
Normally, it should be covered inside the eslint-file.ts, but there is only coverage for the json file for this migration 🤔 .

Expected Behavior

There is no error and the migration run successfully.

GitHub Repo

No response

Steps to Reproduce

  1. Create a new project with version 16.7.
  2. Change the .eslintrc.json to a .eslintrc.js
  3. npx nx migrate nx
  4. npm i
  5. npx nx migrate --run-migrations

Nx Report

Node   : 18.17.1
   OS     : darwin-arm64
   npm    : 9.6.7
   
   nx                 : 16.8.0
   @nx/js             : 16.8.0
   @nx/linter         : 16.8.0
   @nx/workspace      : 16.8.0
   @nx/cypress        : 16.8.0
   @nx/devkit         : 16.8.0
   @nx/eslint-plugin  : 16.8.0
   @nx/react          : 16.8.0
   @nx/storybook      : 16.8.0
   @nrwl/tao          : 16.8.0
   @nx/vite           : 16.8.0
   @nx/web            : 16.8.0
   nx-cloud           : 16.3.0
   typescript         : 5.1.3
   ---------------------------------------
   Community plugins:
   @c0zen/nx-sonarqube : 2.6.0
   nx-stylelint        : 15.0.0

Failure Logs

>  NX   Failed to run update-16-8-0-add-ignored-files from @nx/linter. This workspace is NOT up to date!
>  NX   Cannot find apps/{project-name}/.eslintrc.json

Package Manager Version

No response

Operating System

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

Additional Information

No response

@C0ZEN C0ZEN added the type: bug label Sep 6, 2023
@C0ZEN
Copy link
Author

C0ZEN commented Sep 6, 2023

@jaysoo FYI, since you created this migration 🙏🏻

@FrozenPandaz FrozenPandaz added the scope: linter Issues related to Eslint support in Nx label Sep 6, 2023
@jaysoo jaysoo self-assigned this Sep 6, 2023
@jaysoo
Copy link
Member

jaysoo commented Sep 6, 2023

We added some utilities to update overrides in both .eslintrc.json and (new) eslint.config.js formats, however it is causing issues with other formats. I added a guard to skip other formats like .eslintrc.js so the update won't fail.

#19026

We'll cut a patch for this.

@jaysoo
Copy link
Member

jaysoo commented Sep 6, 2023

For now, you can remove the entry from migrations.json and run the migrations.

{
  "version": "16.8.0",
  "description": "update-16-8-0-add-ignored-files",
  "implementation": "./src/migrations/update-16-8-0-add-ignored-files/update-16-8-0-add-ignored-files",
  "package": "@nx/linter",
  "name": "update-16-8-0-add-ignored-files"
}

@github-actions
Copy link

github-actions bot commented Oct 7, 2023

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 Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: linter Issues related to Eslint support in Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants