[英]Atom throwing babel-eslint error constantly
At first, atom would throw this error if eslint
was not saved as a dependency in a React project and it would pop up as a red notification. 首先,如果
eslint
未在React项目中保存为依赖项,则atom会抛出此错误,并且它会弹出为红色通知。 Now I am working in a directory that is not a git repo and it will incessantly launch this error whenever I try and type. 现在我在一个不是 git repo的目录中工作,每当我尝试输入时它都会不断发出这个错误。 Here's what I'm seeing:
这就是我所看到的:
Error: Cannot find module 'babel-eslint'
at Object.ModuleResolver.resolve (/Users/josetello/.atom/packages/linter-eslint/node_modules/eslint/lib/util/module-resolver.js:75:19)
I've tried updating eslint/babel packages in atom, uninstalling them, looking around in the atom config file for hints as to what this might be, but no luck. 我已经尝试在原子中更新eslint / babel包,卸载它们,在原子配置文件中查找关于这可能是什么的提示,但没有运气。 It's driving me nuts - anyone else run into something similar?
它让我疯了 - 其他人遇到类似的东西?
You may be able to fix this by changing directory to: 您可以通过将目录更改为:
~/.atom/packages/linter-eslint/
Then running: 然后运行:
npm install babel-eslint
You will need to ensure that you have Node installed and npm
in your path for the above to work. 您需要确保已安装Node并在路径中使用
npm
才能使上述工作正常。 I also recommend reporting the issue as a defect on the projects GitHub repository. 我还建议将问题报告为项目GitHub存储库的缺陷 。
Try this setting: 试试这个设置:
You don't need to add babel-eslint
as a dependency. 您不需要将
babel-eslint
添加为依赖项。 Just check this setting in Atom. 只需在Atom中检查此设置即可。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.