简体   繁体   English

无法加载在“package.json » eslint-config-react-app”中声明的插件“import”:找不到模块“typescript/package.json”

[英]Failed to load plugin 'import' declared in 'package.json » eslint-config-react-app': Cannot find module 'typescript/package.json'

ERROR in [eslint] Failed to load plugin 'import' declared in 'package.json » eslint-config-react-app': Cannot find module 'typescript/package.json'
Require stack:
- C:\Users\USER\Desktop\bitcamp-homework_1\homework1\node_modules\eslint-plugin-import\lib\rules\no-duplicates.js
- C:\Users\USER\Desktop\bitcamp-homework_1\homework1\node_modules\eslint-plugin-import\lib\index.js
- C:\Users\USER\Desktop\bitcamp-homework_1\homework1\node_modules\@eslint\eslintrc\dist\eslintrc.cjs

I tried to create new react app with "npx create-react-app", after running npm start, this error appeared.我尝试使用“npx create-react-app”创建新的 React 应用程序,运行 npm 启动后,出现此错误。 I dont even using ts.我什至不使用 ts。 what can I do?我能做什么?

I try reinstall but wont work.我尝试重新安装但无法正常工作。 Sometimes it runs without error.有时它运行没有错误。

[UPDATE] as i found out that was directory problem. [更新] 因为我发现那是目录问题。 (file in file) (文件中的文件)

add:添加:

{
"eslint.workingDirectories": ["./front", "./back", "./shared"]
}

to settings.jsonsettings.json

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法加载在“package.json » eslint-config-react-app”中声明的插件“flowtype”:找不到模块“eslint/use-at-your-own-risk” - Failed to load plugin 'flowtype' declared in 'package.json » eslint-config-react-app': Cannot find module 'eslint/use-at-your-own-risk' 无法加载在“package.json » eslint-config-react-app »”中声明的插件“react”:输入意外结束 - Failed to load plugin 'react' declared in 'package.json » eslint-config-react-app » ': Unexpected end of input 无法加载在“package.json » eslint-config-react-app/jest”中声明的插件“jest”:无法读取未定义的属性(读取“meta”) - Failed to load plugin 'jest' declared in 'package.json » eslint-config-react-app/jest': Cannot read properties of undefined (reading 'meta') 无法加载在“package.json » eslint-config-react-app”中声明的插件“jsx-a11y”:意外的令牌 = - Failed to load plugin 'jsx-a11y' declared in 'package.json » eslint-config-react-app': Unexpected token = 无法加载在 'package.json » eslint-config-react-app#overrides[0]' 中声明的解析器 '@typescript-eslint/parser':找不到模块 'typescript' - Failed to load parser '@typescript-eslint/parser' declared in 'package.json » eslint-config-react-app#overrides[0]': Cannot find module 'typescript' 插件“react”中的错误在“package.json » eslint-config-react-app 之间发生冲突 - ERROR in Plugin "react" was conflicted between "package.json » eslint-config-react-app 插件“react”在“package.json » eslint-config-react-app 之间发生冲突 - Plugin "react" was conflicted between "package.json » eslint-config-react-app ReactJS:无法加载在“package.json”中声明的插件“testing-library”:找不到模块“./eslint-utils” - ReactJS : Failed to load plugin 'testing-library' declared in 'package.json : Cannot find module './eslint-utils' 部署 React 应用程序时出错,它一直在说 &lt;&lt; Plugin "react" was conflicted between "package.json » eslint-config-react-app » &gt;&gt; - Error when deploying react app and it keeps sayings << Plugin "react" was conflicted between "package.json » eslint-config-react-app » >> 错误:无法加载在“.eslintrc.js”中声明的解析器“@babel/eslint-parser”:找不到模块“@babel/core/package.json” - Error: Failed to load parser '@babel/eslint-parser' declared in '.eslintrc.js': Cannot find module '@babel/core/package.json'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM