Error: Failed to load plugin '@nrwl/nx' declared in '.eslintrc.json » ../../../.eslintrc.json#overrides[1]': The specified module could not be found.
See original GitHub issueCurrent Behavior
Cannot lint projects & libs in webstorm
Expected Behavior
Should lint all projects & libs
Repo > main or steps to Reproduce
npx create-nx-workspace nx-workspace --style=scss --nx-cloud=false --preset=angular --cli=angular --pm=yarn --appName=web-client
nx affected:lint
Failure Logs
Error: Failed to load plugin '@nrwl/nx' declared in '.eslintrc.json » ../../../.eslintrc.json#overrides[1]': The specified module could not be found.
\\?\D:\dev\web\practice\workspace\node_modules\@swc\core-win32-x64-msvc\swc.win32-x64-msvc.node
Referenced from: D:\dev\web\practice\workspace\.eslintrc.json
Error: Failed to load plugin '@nrwl/nx' declared in '.eslintrc.json » ../../../.eslintrc.json#overrides[1]': The specified module could not be found.
\\?\D:\dev\web\practice\workspace\node_modules\@swc\core-win32-x64-msvc\swc.win32-x64-msvc.node
Referenced from: D:\dev\web\practice\workspace\.eslintrc.json
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1185:18)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (D:\dev\web\practice\workspace\node_modules\@swc\core\binding.js:67:41)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
Environment
Node : 16.14.0
OS : win32 x64
yarn : 1.22.17
nx : 13.8.3
@nrwl/angular : 13.8.3
@nrwl/cli : 13.8.3
@angular/animations: 13.2.3
@angular/common: 13.2.3
@angular/compiler: 13.2.3
@angular/core: 13.2.3
@angular/forms: 13.2.3
@angular/platform-browser: 13.2.3
@angular/platform-browser-dynamic: 13.2.3
@angular/router: 13.2.3
@angular-devkit/build-angular: 13.2.4
@angular/cli: 13.2.4
@angular/compiler-cli: 13.2.3
@angular/language-service: 13.2.3
(node:13900) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at D:\dev\web\bugs\workspace\node_modules\tslib\package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Error: Failed to load plugin declared in '.eslintrc' : WEB-44691
rc file to use 'eslint-plugin-fp'. Got the error: Error: Failed to load plugin 'fp' declared in '.eslintrc': Cannot find module 'eslint ...
Read more >Using ESLint in Nx Workspaces
ESLint is powerful linter by itself, able to work on the syntax of your source files and assert things about based on the...
Read more >[eslint] failed to load plugin 'prettier' declared in '.eslintrc.json'
I am getting the following error as I am trying to build with maven. [INFO] Error: Failed to load plugin '@typescript-eslint' declared in...
Read more >Failed to load plugin 'import' declared in '... » eslint-config ...
I had the same issue for many weeks and finally found this thread and comment on Github: ...
Read more >Failed to load plugin '@nrwl/nx': Cannot find module '@swc ...
Failed to load plugin '@nrwl/nx' declared in 'libs/eds-base/.eslintrc.json » . ... eslintrc.json#overrides[1]': Cannot find module '@swc/core-linux-x64-gnu' ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Resolved this issue with
npm i -D @swc/core
but couldn’t quickly find the culprit libraryTo all still stuck with this error.
Can you try updating to min v13.8.5? From this version on we explicitly depend on
@swc/core
which depends optionally on platform-specific implementations of the core.Even previous versions should work as
@swc-node/register
depended on@swc/core
indirectly, so there might be something else at stake.You can try running this repo on your local or CI setup: https://github.com/meeroslav/linter-swc-test.
Dependencies, when installed with
yarn --frozen-lockfile
on MacOS will have appropriatecore-darwin-arm64
installed:When installed on Windows it will have
core-win32-x64-msvc
installed (depending on the os version):Most issues we’ve seen so far were the results of corrupted lock files. The following steps should solve those issues:
npm cache clean --force
oryarn cache clean
npm install
oryarn
)If not, please open another issue specifying your OS, node version, nx version, and package manager.
I will close this one, as OPs issue has been resolved by following steps above.