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

Error: Failed to load plugin '@typescript-eslint' declared in '.eslintrc.js': Cannot find module 'eslint/use-at-your-own-risk' #369

Open
xLuisCumbi opened this issue Jul 7, 2023 · 0 comments

Comments

@xLuisCumbi
Copy link

xLuisCumbi commented Jul 7, 2023

Hello
I downloaded and installed the project with npm i
Node version (node -v) : 12.14.1

And when I run npm run build I get this error:
npm run build

@bitaccess/[email protected] prebuild /Users/luis/Documents/Personal/cumbi/coinlib
npm run lint && lerna run --parallel prebuild

@bitaccess/[email protected] lint /Users/luis/Documents/Personal/cumbi/coinlib
bin/find-bad-imports.sh && eslint packages//src packages//test --ext .ts,.js

(node:70122) Warning: require() of ES modules is not supported.
require() of /Users/luis/Documents/Personal/cumbi/coinlib/node_modules/@eslint/eslintrc/universal.js from /Users/luis/Documents/Personal/cumbi/coinlib/node_modules/eslint/lib/linter/linter.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename universal.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/luis/Documents/Personal/cumbi/coinlib/node_modules/@eslint/eslintrc/package.json.

Oops! Something went wrong! :(

ESLint: 8.21.0

Error: Failed to load plugin '@typescript-eslint' declared in '.eslintrc.js': Cannot find module 'eslint/use-at-your-own-risk'
Require stack:

  • /Users/luis/Documents/Personal/cumbi/coinlib/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js
  • /Users/luis/Documents/Personal/cumbi/coinlib/node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js
  • /Users/luis/Documents/Personal/cumbi/coinlib/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js
  • /Users/luis/Documents/Personal/cumbi/coinlib/node_modules/@typescript-eslint/eslint-plugin/dist/index.js
  • /Users/luis/Documents/Personal/cumbi/coinlib/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
    Referenced from: /Users/luis/Documents/Personal/cumbi/coinlib/.eslintrc.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
    at Function.Module._load (internal/modules/cjs/loader.js:686:27)
    at Module.require (internal/modules/cjs/loader.js:848:19)
    at require (/Users/luis/Documents/Personal/cumbi/coinlib/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at /Users/luis/Documents/Personal/cumbi/coinlib/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js:34:5
    at Object. (/Users/luis/Documents/Personal/cumbi/coinlib/node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js:5:60)
    at Module._compile (/Users/luis/Documents/Personal/cumbi/coinlib/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)
    at Function.Module._load (internal/modules/cjs/loader.js:723:14)

How can I solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant