I'm new to react. I'm following the tutorial steps installing node. However, when I run npm start, errors keep show up.
Failed to compile. ./src/index.js Module build failed: Error: Failed to load plugin import: Cannot find module 'eslint-plugin-import' Referenced from: at Array.forEach (native) at Array.reduceRight (native) Also, I tried to install 'eslint-plugin-import', but in vain...
npm install eslint-plugin-import -g npm WARN [email protected] requires a peer of [email protected] - 4.x but none was installed. + [email protected] System info
eslint --version v4.2.0 npm -v 5.2.0 npm list -g | grep eslint ├─┬ [email protected] │ ├─┬ [email protected] ├─┬ [email protected] │ ├─┬ [email protected] │ ├─┬ [email protected] ├─┬ [email protected]
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names. All the goodness that the ES2015+ static module syntax intends to provide, marked up in your editor.
eslint-plugin-node follows semantic versioning and ESLint's Semantic Versioning Policy. Patch release (intended to not break your lint build) A bug fix in a rule that results in it reporting fewer errors.
If you haven't installed ESLint either locally or globally do so by running npm install eslint in the workspace folder for a local install or npm install -g eslint for a global install. On new folders you might also need to create a . eslintrc configuration file.
The issue is resolved for me after installing the following in a row:
npm install eslint-plugin-import eslint-plugin-flowtype eslint-plugin-jsx-a11y eslint-plugin-react Have you tried installing eslint locally, like
npm install eslint-plugin-import --save-dev ?
Edit -Solution:
Instead of installing eslint packages one after another, the problem can be alleviated by
npm install react-scripts as react-scripts is taking care of webpack, babel and eslint and the dependencies thereof.
This may avoid conflicts, as in your case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With