Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/34.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/24.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
Node.js can';t运行:npm在react上启动_Node.js_Reactjs_Npm - Fatal编程技术网

Node.js can';t运行:npm在react上启动

Node.js can';t运行:npm在react上启动,node.js,reactjs,npm,Node.js,Reactjs,Npm,当我尝试使用npm start运行我的项目时,它确实显示了此错误,我似乎不清楚: react-app-rewired start The "path" argument must be of type string or an instance of Buffer or URL. Received undefined npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! webapp@0.1.0 start: `react-app-rewired

当我尝试使用npm start运行我的项目时,它确实显示了此错误,我似乎不清楚:

react-app-rewired start

The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webapp@0.1.0 start: `react-app-rewired start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webapp@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\kilanh\AppData\Roaming\npm-cache\_logs\2020-03-11T09_43_14_766Z-debug.log
  • 我遇到了同样的问题,我认为问题在于npm与纱线的配合,它工作良好,请尝试以下方法:
  • 删除锁定文件
  • 删除节点单元模块
  • 跑“纱”
  • 运行“纱线启动”

这里已经解决了:在你的包json文件中定义了什么start命令?start:“node./index.j”删除node_模块和锁文件运行npm缓存clean--force。然后npm安装。你试过了吗?是的,我认为它与npm无关,它与错误中显示的路径有关。。