9 javascript reactjs react-router react-native react-redux
项目依赖关系树可能存在问题。这可能不是Create React App中的错误,而是您需要在本地修复的问题。
Create React App提供的react-scripts软件包需要依赖项:
“ babel-eslint”:“ 9.0.0”
不要尝试手动安装它:包管理器会自动安装它。但是,在树的较高位置检测到了另一个版本的babel-eslint:
小智 19
我遇到了同样的问题并执行了所有建议的步骤,但问题仍然存在,所以,我的错误是我在其他具有此结构的 Javascript 应用程序中有一个 reactApp。
--MyProjects
----NodeJsApp
----node_modules of NodeJsApp
----package.json of NodeJsApp
----ReactApp
------node_modules of ReactApp
------package.json of ReactApp
Run Code Online (Sandbox Code Playgroud)
这个问题解决了我删除我的 ReactApp node_modules 目录,然后我重新构造了我的目录,因为我遇到了灾难。
--MyProjects
----NewDirectory (inside all about NodeJsApp)
------node_modules of NodeJsApp
------package.json of NodeJsApp
----ReactApp
------package.json of ReactApp
Run Code Online (Sandbox Code Playgroud)
之后我做:
npm install
Run Code Online (Sandbox Code Playgroud)
然后npm start 我的问题已经解决,我认为问题是父目录不能有 javascript /nodeJs/ 项目或具有 node_modules 的东西。
create .env file in your project file and add the following statement
SKIP_PREFLIGHT_CHECK=true
Run Code Online (Sandbox Code Playgroud)
Save the file
Remove node_modules, yarn.lock, package.lock
Then reinstall node_modules with
npm install
Run Code Online (Sandbox Code Playgroud)
This should work
您提供的部分输出内容为:
检查C:\ Users \ chawki \ node_modules \ babel-eslint是否在项目目录之外。例如,您可能不小心在主文件夹中安装了某些内容。
浏览C:\Users\chawki\node_modules\并删除babel-eslint文件夹,或直接删除C:\Users\chawki\node_modules。
小智 5
在这里我做了什么...
C:\user\[yourUserName]\node_modules\babel-eslint并删除文件C:\user\[yourUserName]\node_modules\eslint并删除文件| 归档时间: |
|
| 查看次数: |
6296 次 |
| 最近记录: |