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

Package tries to access globals and causes error in ESLint #7

Closed
Rocamonde opened this issue Sep 1, 2020 · 1 comment
Closed

Package tries to access globals and causes error in ESLint #7

Rocamonde opened this issue Sep 1, 2020 · 1 comment
Labels

Comments

@Rocamonde
Copy link

I upgraded to ESLint 7.8 today, and by doing this @eslint/eslintrc was also installed. Now, when I try to run ESLint from Yarn 2, the following error pops up:

Error: @eslint/eslintrc tried to access globals, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: globals (via "globals")
Required by: @eslint/eslintrc@npm:0.1.0 (via /Users/MY_USERNAME/MY_PROJECT/.yarn/cache/@eslint-eslintrc-npm-0.1.0-30c7545ebe-53d20acf9f.zip/node_modules/@eslint/eslintrc/conf/)

Require stack:
- /Users/MY_USERNAME/MY_PROJECT/.yarn/cache/@eslint-eslintrc-npm-0.1.0-30c7545ebe-53d20acf9f.zip/node_modules/@eslint/eslintrc/conf/environments.js
- /Users/MY_USERNAME/MY_PROJECT/.yarn/cache/eslint-npm-7.8.0-3feded5885-2c25ff617b.zip/node_modules/eslint/lib/linter/linter.js
- /Users/MY_USERNAME/MY_PROJECT/.yarn/cache/eslint-npm-7.8.0-3feded5885-2c25ff617b.zip/node_modules/eslint/lib/linter/index.js
- /Users/MY_USERNAME/MY_PROJECT/.yarn/cache/eslint-npm-7.8.0-3feded5885-2c25ff617b.zip/node_modules/eslint/lib/cli-engine/cli-engine.js
- /Users/MY_USERNAME/MY_PROJECT/.yarn/cache/eslint-npm-7.8.0-3feded5885-2c25ff617b.zip/node_modules/eslint/lib/eslint/eslint.js
- /Users/MY_USERNAME/MY_PROJECT/.yarn/cache/eslint-npm-7.8.0-3feded5885-2c25ff617b.zip/node_modules/eslint/lib/eslint/index.js
- /Users/MY_USERNAME/MY_PROJECT/.yarn/cache/eslint-npm-7.8.0-3feded5885-2c25ff617b.zip/node_modules/eslint/lib/cli.js
- /Users/MY_USERNAME/MY_PROJECT/.yarn/cache/eslint-npm-7.8.0-3feded5885-2c25ff617b.zip/node_modules/eslint/bin/eslint.js
    at internalTools_makeError (/Users/MY_USERNAME/MY_PROJECT/.pnp.js:23429:34)
    at resolveToUnqualified (/Users/MY_USERNAME/MY_PROJECT/.pnp.js:24387:23)
    at resolveRequest (/Users/MY_USERNAME/MY_PROJECT/.pnp.js:24479:29)
    at Object.resolveRequest (/Users/MY_USERNAME/MY_PROJECT/.pnp.js:24545:26)
    at Function.external_module_.Module._resolveFilename (/Users/MY_USERNAME/MY_PROJECT/.pnp.js:23662:34)
    at Function.external_module_.Module._load (/Users/MY_USERNAME/MY_PROJECT/.pnp.js:23527:48)
    at Module.require (internal/modules/cjs/loader.js:1080:19)
    at require (/Users/MY_USERNAME/MY_PROJECT/.yarn/cache/v8-compile-cache-npm-2.1.0-86ea69cdd0-b7490d5484.zip/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/Users/MY_USERNAME/MY_PROJECT/.yarn/cache/@eslint-eslintrc-npm-0.1.0-30c7545ebe-53d20acf9f.zip/node_modules/@eslint/eslintrc/conf/environments.js:11:17)
    at Module._compile (/Users/MY_USERNAME/MY_PROJECT/.yarn/cache/v8-compile-cache-npm-2.1.0-86ea69cdd0-b7490d5484.zip/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)

When downgrading to ESLint 7.7, the error is solved.

@nzakas
Copy link
Member

nzakas commented Sep 1, 2020

Duplicate of #1 and #4. Followup: #6

@nzakas nzakas closed this as completed Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants