The react-scripts package provided by Create React App requires a dependency:

后端 未结 10 2598
夕颜
夕颜 2021-02-18 14:12

There might be a problem with the project dependency tree. It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts package p

相关标签:
10条回答
  • 2021-02-18 14:22

    Here What i did...

    1. C:\user\[yourUserName]\node_modules\babel-eslint and delete the file
    2. C:\user\[yourUserName]\node_modules\eslint and delete the file
    0 讨论(0)
  • 2021-02-18 14:24

    create .env file in your project file and add the following statement

    SKIP_PREFLIGHT_CHECK=true
    

    Save the file

    Remove node_modules, yarn.lock, package.lock

    Then reinstall node_modules with

    npm install
    

    This should work

    0 讨论(0)
  • 2021-02-18 14:34

    Part of the output you provided says:

    Check if C:\Users\chawki\node_modules\babel-eslint is outside your project directory. For example, you might have accidentally installed something in your home folder.

    Browse to C:\Users\chawki\node_modules\ and delete the babel-eslint folder, or simply delete C:\Users\chawki\node_modules.

    0 讨论(0)
  • 2021-02-18 14:37

    Make sure you don't have a global webpack package or somewhere higher up the directory structure. In my case, I had it globally installed. Deleting and then running npm install and then npm start worked perfectly.

    0 讨论(0)
  • 2021-02-18 14:37

    I had the same problem and do all the suggested steps but the problem still, so, my error is that i have a reactApp inside other Javascript App i had this structure.

    --MyProjects
    ----NodeJsApp
    ----node_modules of NodeJsApp
    ----package.json of NodeJsApp
    ----ReactApp
    ------node_modules of ReactApp
    ------package.json of ReactApp
    

    The problem solved to me deleting my ReactApp node_modules directory, then i do a reestructure of my directories because i have a disaster.

    --MyProjects
    ----NewDirectory (inside all about NodeJsApp)
    ------node_modules of NodeJsApp
    ------package.json of NodeJsApp
    ----ReactApp
    ------package.json of ReactApp
    

    After that i do :

    npm install
    

    and then npm start and my problem has fixed, i think that the problem is that the parent directory cant have a javascript /nodeJs/ project or something that have node_modules .

    0 讨论(0)
  • 2021-02-18 14:38

    My problem was I installed webpack as a global package... after i deleted webpact and run npm install, the problem was gone

    0 讨论(0)
提交回复
热议问题