Comments (6)
At first it seemed to work on my side after yarn dev
.
But I get Environment key "jest/globals" is unknown
#98 every time I save now.
from eslint.
Well, the error message I copied and pasted above didn't even appear when I fired up my IDE the next day. (Seems to happen to a lot of folks: one day the error message just showed up, and the next day it disappeared.)
There were other error messages => other rabbit holes to descend into and spend time in. (And then they wonder why people hate upgrading software - man, it can be soooo painful and sooo time-consuming.)
Anyway, finally got everything resolved => no need to re-open.
P.S. Thanks to all of the work you good people do to provide us with free software. I know it must be a RPITA at times, and it is MUCH APPRECIATED!
from eslint.
Here's what I get:
c:\Users\User\myProject>yarn lint
yarn run v1.22.15
$ eslint --fix --ext .js,.vue client/
Oops! Something went wrong! :(
ESLint: 8.0.0
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Failed to load plugin 'import' declared in '.eslintrc.js » @nuxtjs/eslint-config': Package subpath './lib/util/glob-util' is not defined by "exports" in c:\Users\User\myProject\node_modules\eslint\package.json
Referenced from: c:\Users\User\myProject\node_modules\@nuxtjs\eslint-config\index.js
at new NodeError (node:internal/errors:371:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:440:9)
at packageExportsResolve (node:internal/modules/esm/resolve:692:3)
at resolveExports (node:internal/modules/cjs/loader:482:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (c:\Users\User\myProject\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
at Object.<anonymous> (c:\Users\User\myProject\node_modules\eslint-plugin-import\lib\rules\no-unused-modules.js:43:34)
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
from eslint.
I believe this should be solved.
from eslint.
Hi,
I just upgraded eslint from 7.30.0 to 8.17.0, and eslint-plugin-nuxt from 2.0.0 to 3.2.0, i.e. the latest and greatest versions of each.
I am getting the error talked about is this issue, and the infuriating thing is that I don't even use Jest or have it installed. I have searched around and tried different fixes and nothing seems to help. The "Details" are below.
Now every time I open a file in my (RubyMine) IDE I get an annoying red banner at the top of the file.
Can someone please re-open this or tell me what I should do?
Thanks,
Larry
Error: .eslintrc.js » @nuxtjs/eslint-config:
Environment key "jest/globals" is unknown
Error: .eslintrc.js » @nuxtjs/eslint-config:
Environment key "jest/globals" is unknown
at /home/larry/RubymineProjects/FrontEnd/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2058:23
at Array.forEach (<anonymous>)
at ConfigValidator.validateEnvironment (/home/larry/RubymineProjects/FrontEnd/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2052:34)
at ConfigValidator.validateConfigArray (/home/larry/RubymineProjects/FrontEnd/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2202:18)
at CascadingConfigArrayFactory._finalizeConfigArray (/home/larry/RubymineProjects/FrontEnd/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3947:23)
at CascadingConfigArrayFactory.getConfigArrayForFile (/home/larry/RubymineProjects/FrontEnd/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3753:21)
at CLIEngine.isPathIgnored (/home/larry/RubymineProjects/FrontEnd/node_modules/eslint/lib/cli-engine/cli-engine.js:989:18)
at ESLint.isPathIgnored (/home/larry/RubymineProjects/FrontEnd/node_modules/eslint/lib/eslint/eslint.js:678:26)
at ESLint8Plugin.<anonymous> (/snap/rubymine/290/plugins/JavaScriptLanguage/languageService/eslint/bin/eslint8-plugin.js:164:57)
at step (/snap/rubymine/290/plugins/JavaScriptLanguage/languageService/eslint/bin/eslint8-plugin.js:44:23)
Process finished with exit code -1
from eslint.
Hello again,
I found another of your issues related to this (#98) and they said to make sure @nuxtjs/eslint-config was updated. I was way behind on that so I updated from 6.0.1 to the latest, 10.0.0
The "jest/globals" error message went away, but now I have this:
Error: ENOENT: no such file or directory, open '/node_modules/@nuxtjs/eslint-config/node_modules/eslint-config-standard/index.js'
I have node/modules/@nuxtjs/esling-config... but no /node_modules directory under that => I need to look into this.
I can't work on this any more today, but I wanted to add this update so as not to waste anyone's time on my error. I will look into this tomorrow and report back. Hopefully I can resolve the problem and this will help anyone else who stumbles across this.
from eslint.
Related Issues (20)
- docs: document `autoInit` HOT 2
- docs: `i-ph-lightbulb-duotone` is not displayed HOT 3
- Cannot find module '[...]/.nuxt/eslint.config.mjs' HOT 3
- Include `eslint-plugin-regexp` in `tooling` preset HOT 2
- ConfigError: Key "plugins": Cannot redefine plugin "import" in Nuxt ESLint configuration HOT 2
- Constant Error: Cannot find module 'typescript' HOT 14
- Cannot find package 'vite-plugin-eslint2' HOT 5
- feat(config): add `no-import-type-side-effects` rule of `@typescript-eslint` HOT 1
- docs: add how to use composer HOT 3
- Add Tailwindcss class sorter HOT 8
- eslint/config-inspector custom host/port when using @nuxt/eslit HOT 1
- Question: Unexpected key "typescript" found HOT 4
- Nuxt Deployment on DigitalOcean // ERROR Cannot find module '/workspace/@nuxt/eslint' HOT 1
- Allow `no-undef` also on plain JavaScript files, not just Typescript HOT 12
- Add `public` folder to the ignore list
- `vue/no-ref-as-operand` does not trigger on `useState`
- Upgrade to typescript-eslint v8 HOT 3
- Not allow multiple root elements in server component
- Request for support on failOnError Overlay when applying nuxt/eslint HOT 3
- Several built-in Nuxt globals are not defined in ESLint config, causing linter to error in JS files HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint.