Giter VIP home page Giter VIP logo

Comments (12)

mgansler avatar mgansler commented on June 24, 2024 1

with 19.0.5:

yarn why v1.22.22
[1/4] 🤔  Why do we have the module "eslint"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "[email protected]"
info Has been hoisted to "eslint"
info Reasons this module exists
   - Specified in "devDependencies"
   - Hoisted from "@nx#eslint#eslint"
info Disk size without dependencies: "5.5MB"
info Disk size with unique dependencies: "15.11MB"
info Disk size with transitive dependencies: "18.44MB"
info Number of shared dependencies: 80

With 19.0.6:

yarn why v1.22.22
[1/4] 🤔  Why do we have the module "eslint"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "[email protected]"
info Has been hoisted to "eslint"
info This module exists because it's specified in "devDependencies".
info Disk size without dependencies: "5.38MB"
info Disk size with unique dependencies: "14.99MB"
info Disk size with transitive dependencies: "18.29MB"
info Number of shared dependencies: 82
=> Found "@nx/eslint#[email protected]"
info This module exists because "@nx#eslint" depends on it.
info Disk size without dependencies: "3.8MB"
info Disk size with unique dependencies: "11.71MB"
info Disk size with transitive dependencies: "15.73MB"
info Number of shared dependencies: 80

And with eslint removed from my package.json (and Nx 19.0.6):

y why eslint
yarn why v1.22.22
[1/4] 🤔  Why do we have the module "eslint"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "[email protected]"
info Reasons this module exists
   - "@nx#eslint" depends on it
   - Hoisted from "@nx#eslint#eslint"
info Disk size without dependencies: "5.34MB"
info Disk size with unique dependencies: "14.5MB"
info Disk size with transitive dependencies: "18.33MB"
info Number of shared dependencies: 71

Same error though, still context.getScope is not a function

from nx.

mgansler avatar mgansler commented on June 24, 2024 1

When I force eslint to 8.57.0, linting works:

 "resolutions": {
    "eslint": "8.57.0"
  }
yarn why v1.22.22
[1/4] 🤔  Why do we have the module "eslint"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "[email protected]"
info Has been hoisted to "eslint"
info Reasons this module exists
   - Specified in "devDependencies"
   - Hoisted from "@nx#eslint#eslint"
info Disk size without dependencies: "5.5MB"
info Disk size with unique dependencies: "15.11MB"
info Disk size with transitive dependencies: "18.44MB"
info Number of shared dependencies: 80

Can someone with npm try this with overrides instead of resolutions?

from nx.

JamesHenry avatar JamesHenry commented on June 24, 2024 1

FYI we confirmed this is only an issue with yarn. The other package managers behave how we expected and do not force the eslint v9 dependency upon you. We are still discussing the ultimate resolution to this.

from nx.

mgansler avatar mgansler commented on June 24, 2024

I have noticed a very similar behaviour:

Linting "components"...
 NX   context.getScope is not a function
Occurred while linting /builds/mgansler/plusone/libs/components/cypress/support/commands.ts:14
Rule: "import/no-amd"

Worked fine with 19.0.5 but is broken with 19.0.6 and no other changes.
The version of @typescript-eslint/* seems to make no difference for me, same result with 7.3.0 and 7.10.0

from nx.

SteveW94 avatar SteveW94 commented on June 24, 2024

I experienced the same.

Due to this the Update PR is currently on hold

from nx.

Tijawk avatar Tijawk commented on June 24, 2024

I have huge performance issue with lerna since I have updated nx from 19.0.5 to 19.0.6. I use @typescript-eslint/*@7.10.0 too,

I think it's the same probleme. I have rollback to 19.0.5.

from nx.

FrozenPandaz avatar FrozenPandaz commented on June 24, 2024

I have huge performance issue with lerna since I have updated nx from 19.0.5 to 19.0.6. I use @typescript-eslint/*@7.10.0 too,

I think it's the same probleme. I have rollback to 19.0.5.

Mm.. this isn't much details but I think this might be a separate issue unrelated to this one.

NX context.getScope is not a function

Thank you for reporting it. We'll look into it.

from nx.

JamesHenry avatar JamesHenry commented on June 24, 2024

@TomTomB @mgansler @SteveW94 Maybe you are now pulling in eslint v9?

Please try running this command or similar and see what version of eslint is getting pulled in:

npm ls eslint

from nx.

JamesHenry avatar JamesHenry commented on June 24, 2024

@Tijawk Please open a fresh issue for your case with maximum information/steps to reproduce

from nx.

TomTomB avatar TomTomB commented on June 24, 2024

@JamesHenry Both eslint versions (8.57.x, and 9.x) result in the same error.

from nx.

SteveW94 avatar SteveW94 commented on June 24, 2024

@JamesHenry
This is before the installation of 19.0.6

image

As you can see no eslint 9
Just after installation of 19.0.6

image

You can see, @nx/[email protected] is the culprit, as it references eslint 9!

In my package .json there is:
"eslint": "8.57.0" pinned. So no Semver Tag or anything.

So I would say, this way ESLint "sneaks" in there should not be intended!

from nx.

SteveW94 avatar SteveW94 commented on June 24, 2024

👍🏼

from nx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.