Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

(After ejecting) Error while running ESLint: Cannot find module 'eslint-config-react-app' #338

@aurerua

Description

@aurerua

Is this a bug report?

Yes

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

--

Which terms did you search for in User Guide?

eject, eslint

Environment

  1. npm ls react-scripts-ts (if you haven’t ejected):
  2. node -v: v8.9.4
  3. npm -v: 6.0.0
  4. yarn --version (if you use Yarn): 1.7.0
  5. npm ls react-scripts-ts (if you haven’t ejected):

Then, specify:

  1. Operating system: linux (Pop!_OS)
  2. Browser and version (if relevant):

Steps to Reproduce

npx create-react-app my-app --scripts-version=react-scripts-ts
cd my-app
npm run eject
  1. Open a JS file, e.g. ./scripts/start.js
  2. I am using Atom editor with linter-eslint, so it picks up the eslintConfig from ./package.json and it throws the Error: Error while running ESLint: Cannot find module 'eslint-config-react-app'

Expected Behavior

No ESLint Error on opening a JS file.

Which would probably be solved by either have no eslintConfig in ./package.json or have the stated react-app dependency installed.

Actual Behavior

After ejecting, if one then scrolls down to the bottom of ./package.json, it shows:

{
  "eslintConfig": {
    "extends": "react-app"
  }
}

Yet the dependency is missing:

npm ls eslint-config-react-app
my-app@0.1.0 /home/aurelien/tmp/my-app
└── (empty)

Reproducible Demo

--

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy