node.js - React 应用程序未在浏览器中运行。如何解决这个问题?
问题描述
启动开发服务器...
events.js:183
throw er; // Unhandled 'error' event
^
Error: watch /home/test/Documents/test/public ENOSPC
at _errnoException (util.js:1022:11)
at FSWatcher.start (fs.js:1382:19)
at Object.fs.watch (fs.js:1408:11)
at createFsWatchInstance (/home/test/Documents/test/node_modules/chokidar/lib/nodefs-handler.js:38:15)
at setFsWatchListener (/home/test/Documents/test/node_modules/chokidar/lib/nodefs-handler.js:81:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/oxss-006/Documents/test/node_modules/chokidar/lib/nodefs-handler.js:233:14)
at FSWatcher.NodeFsHandler._handleDir (/home/test/Documents/test/node_modules/chokidar/lib/nodefs-handler.js:429:19)
at FSWatcher.<anonymous> (/home/test/Documents/test/node_modules/chokidar/lib/nodefs-handler.js:477:19)
at FSWatcher.<anonymous> (/home/test/Documents/test/node_modules/chokidar/lib/nodefs-handler.js:482:16)
at FSReqWrap.oncomplete (fs.js:153:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test@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! /home/.npm/_logs/2019-09-23T04_38_51_220Z-debug.log
启动 npm 时出现错误。它没有在浏览器中运行。如何解决这个问题?如果有人知道请回答这个问题。
This site can’t be reachedlocalhost refused to connect.
Did you mean http://localhost3000.org/?
Search Google for localhost 3000
ERR_CONNECTION_REFUSED
我正在使用这些版本
node v -v8.10.0
npm - 6.11.3
谢谢。
解决方案
回声 fs.inotify.max_user_watches=999999 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
您的手表结束了,手表用于在代码发生变化时重新加载应用程序。
推荐阅读
- c# - 如何使用公钥加密字符串并使用 MimeKit 使用私钥解密?
- flutter - 有没有办法在手机锁定时保持计时器运行?
- python - 弗劳恩霍夫衍射——可能转移 fft2 问题
- python-3.x - 在 matplotlib 中添加从另一个库生成的图像作为插图
- tensorflow - 'conda install tensorflow-gpu' 没有安装任何 CUDNN 库
- java - Java:: 进程构建器:bash 脚本:返回的文件名是正确的,但 fileReader 抛出 FileNotFoundException
- java - 将16BitPCM转为.wav,切换字节序后,.wav文件向后播放
- neo4j - 有没有办法在密码查询中进行计算?
- matplotlib - 简单的matplotlib作为flask生成的网页中的嵌入图像
- postgresql - 通过从远程客户端连接的 psql 使用多个 sql 查询