Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs 没有安装_Reactjs_Compiler Errors - Fatal编程技术网

Reactjs 没有安装

Reactjs 没有安装,reactjs,compiler-errors,Reactjs,Compiler Errors,我一直在尝试使用npx和npm两种方法在我的电脑上安装React,但即使这样,我的终端(VSCode)也会抛出此错误。我无法启动我的自定义react应用程序 我检查了其他回复,但我不满意 My current node version is 12.16.2 我的package.json文件是: "name": "myapp", "version": "0.1.0", "private": tr

我一直在尝试使用
npx
npm

两种方法在我的电脑上安装React,但即使这样,我的终端(VSCode)也会抛出此错误。我无法启动我的自定义react应用程序
我检查了其他回复,但我不满意

My current node version is 12.16.2

我的package.json文件是:

"name": "myapp",
"version": "0.1.0",
"private": true,
"dependencies": {
 "@testing-library/jest-dom": "^4.2.4",
 "@testing-library/react": "^9.5.0",
 "@testing-library/user-event": "^7.2.1",
 "react": "^16.13.1",
 "react-dom": "^16.13.1",
 "react-scripts": "3.4.3"
},
"scripts": {
 "start": "react-scripts start",
 "build": "react-scripts build",
 "test": "react-scripts test",
 "eject": "react-scripts eject"
},
"eslintConfig": {
 "extends": "react-app"
},
"browserslist": {
 "production": [
   ">0.2%",
   "not dead",
   "not op_mini all"
 ],
 "development": [
   "last 1 chrome version",
   "last 1 firefox version",
   "last 1 safari version"
 ]
}
}


我已经被困了好几个小时了。非常感谢您的帮助。

实际上,您的控制台中有该错误消息。您的文件路径中不允许使用感叹号。@fooiey谢谢您的澄清。问题解决了。
"name": "myapp",
"version": "0.1.0",
"private": true,
"dependencies": {
 "@testing-library/jest-dom": "^4.2.4",
 "@testing-library/react": "^9.5.0",
 "@testing-library/user-event": "^7.2.1",
 "react": "^16.13.1",
 "react-dom": "^16.13.1",
 "react-scripts": "3.4.3"
},
"scripts": {
 "start": "react-scripts start",
 "build": "react-scripts build",
 "test": "react-scripts test",
 "eject": "react-scripts eject"
},
"eslintConfig": {
 "extends": "react-app"
},
"browserslist": {
 "production": [
   ">0.2%",
   "not dead",
   "not op_mini all"
 ],
 "development": [
   "last 1 chrome version",
   "last 1 firefox version",
   "last 1 safari version"
 ]
}
}