question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm start gives "Module build failed: Error: Failed to load plugin import: Cannot find module 'eslint-plugin-import'"

See original GitHub issue

Is this a bug report?

Yes, seems like it to me.

Can you also reproduce the problem with npm 4.x?

I haven’t tried yet. I think that would be a wild goose chase. This problem just started today out of the blue. My hunch is that is an environment problem of some sort.

Which terms did you search for in User Guide?

I did a google search instead. Found no help.

Environment

  1. node -v: v8.1.2
  2. npm -v: 5.2.0
  3. yarn --version (if you use Yarn): don’t use
  4. npm ls react-scripts (if you haven’t ejected): react-scripts@1.0.10

Then, specify:

  1. Operating system: macOS 10.12.5
  2. Browser and version (if relevant): Chrome Version 59.0.3071.115 (Official Build) (64-bit)

Steps to Reproduce

(Write your steps here:)

Invoke:

  1. create-react-app my-app (no issues here)
  2. cd my-app
  3. npm start

After step #3 the console window shows:

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)

Expected Behavior

(Write what you thought would happen.)

Actual Behavior

(Write what happened. Please add screenshots!)

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:16
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

10reactions
tenzancommented, Jul 13, 2017

I had same issue. Installing manually following modules was a fix for me:

eslint-plugin-import
eslint-plugin-react
eslint-plugin-flowtype
eslint-plugin-jsx-a11y
9reactions
AlexeyGorokhovcommented, Jul 15, 2017

Upgrading to npm@5.3.0 solves the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to load plugin 'import' declared in '... » eslint-config ...
I've tried setting it up through eslint --init, uninstalling eslint globally and having all the packages locally, installing each package ...
Read more >
eslint-plugin-import - npm
Start using eslint-plugin-import in your project by running `npm i ... Ensure imports point to a file/module that can be resolved.
Read more >
Failed To Load Plugin Import: Cannot Find Module 'Eslint
Not all problems are fixable using this option and the option does not work in these situations: This option throws an error when...
Read more >
[eslint] failed to load plugin 'prettier' declared in '.eslintrc.js'
VSCode failed to load plugin cannot find module 'eslint-plugin-prettier' ... In short, create an NPM package in your monorepo - you don't have...
Read more >
Error: Failed to load plugin import: Cannot find module 'eslint ...
Coding example for the question Error: Failed to load plugin import: Cannot find module 'eslint-plugin-import' when deploying a create-react-app-Reactjs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found