Failed to load plugin '@nrwl/nx': Cannot find module '@swc/core-linux-x64-gnu'
See original GitHub issueI’m having an issue running my linting tasks on my CI server. The error message that comes up is that the module can’t be found for @swc/core. Is it possible to find out exactly what version it’s trying to install? Or is this a problem with eslint 8?
> nx run eds-base:lint
Linting "eds-base"...
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'
Require stack:
- /opt/vgi/bamboo/agents/awsagent-1/xml-data/build-dir/ICSCPS-EDS163-LIBEDSBASELINTUNITTEST/node_modules/@swc/core/binding.js
- /opt/vgi/bamboo/agents/awsagent-1/xml-data/build-dir/ICSCPS-EDS163-LIBEDSBASELINTUNITTEST/node_modules/@swc/core/index.js
- /opt/vgi/bamboo/agents/awsagent-1/xml-data/build-dir/ICSCPS-EDS163-LIBEDSBASELINTUNITTEST/node_modules/@swc-node/core/lib/index.js
- /opt/vgi/bamboo/agents/awsagent-1/xml-data/build-dir/ICSCPS-EDS163-LIBEDSBASELINTUNITTEST/node_modules/@swc-node/register/lib/register.js
- /opt/vgi/bamboo/agents/awsagent-1/xml-data/build-dir/ICSCPS-EDS163-LIBEDSBASELINTUNITTEST/node_modules/@nrwl/eslint-plugin-nx/node_modules/nx/src/utils/register.js
- /opt/vgi/bamboo/agents/awsagent-1/xml-data/build-dir/ICSCPS-EDS163-LIBEDSBASELINTUNITTEST/node_modules/@nrwl/eslint-plugin-nx/src/resolve-workspace-rules.js
- /opt/vgi/bamboo/agents/awsagent-1/xml-data/build-dir/ICSCPS-EDS163-LIBEDSBASELINTUNITTEST/node_modules/@nrwl/eslint-plugin-nx/src/index.js
- /opt/vgi/bamboo/agents/awsagent-1/xml-data/build-dir/ICSCPS-EDS163-LIBEDSBASELINTUNITTEST/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
Referenced from: /opt/vgi/bamboo/agents/awsagent-1/xml-data/build-dir/ICSCPS-EDS163-LIBEDSBASELINTUNITTEST/.eslintrc.json
npm list --depth=0 here https://gist.github.com/ChazUK/2cda2da98ae9b3092357aae6b96671c1
and Nx Report is also below
Node : 14.18.2
OS : linux x64
npm : 6.14.15
nx : 13.9.2
@nrwl/angular : 13.9.2
@nrwl/cypress : 13.9.2
@nrwl/detox : undefined
@nrwl/devkit : 13.8.1
@nrwl/eslint-plugin-nx : 13.9.2
@nrwl/express : undefined
@nrwl/jest : 13.9.2
@nrwl/js : 13.9.2
@nrwl/linter : 13.9.2
@nrwl/nest : undefined
@nrwl/next : undefined
@nrwl/node : undefined
@nrwl/nx-cloud : undefined
@nrwl/nx-plugin : undefined
@nrwl/react : undefined
@nrwl/react-native : undefined
@nrwl/schematics : undefined
@nrwl/storybook : 13.9.2
@nrwl/web : undefined
@nrwl/workspace : 13.9.2
typescript : 4.5.5
rxjs : 6.6.7
---------------------------------------
Community plugins:
@compodoc/compodoc: 1.1.18
@jscutlery/semver: 2.18.1
@storybook/angular: 6.4.17
ng-mocks: 13.0.2
nx-stylelint: 12.3.1
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:5 (1 by maintainers)
Top Results From Across the Web
license-webpack-plugin error with nrwl/nx 8.8.0 - Stack Overflow
I don't use the license-webpack-plugin in my project ( package.json ), but in package-lock.json I can see that it is required by: @angular- ......
Read more >nrwl-nx/community - Gitter
I get an error saying: "Cannot read property 'getChildren' of undefined" and I have no ... I get the error Cannot find module...
Read more >@nrwl/eslint-plugin-nx - npm
The create-nx-workspace command will ask you to select a preset, which will configure some plugins and create your applications to help you get...
Read more >nrwl/nx-plugin
A list of plugins that is maintained by Nrwl is found in the Nrwl/nx repo. ... If you do not want to create...
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
This is a duplicate of https://github.com/nrwl/nx/issues/8969
Check this comment or this comment for the potential solution.
The core of the problem is in the lock file missing the optional dependencies requested by
@swc/core
.Make sure you run
npm ci
on your CI and do not provide askip-optional
flag.We’re trying to upgrade to node 16 and see this exact error in Github Actions, and unfortunately regenerating
package-lock.json
doesn’t help. The identical repo works fine under node 14.