7|arm | npm ERR! A complete log of this run can be found in:
7|arm | npm ERR! /root/.npm/_logs/2021-07-30T07_20_32_242Z-debug.log
PM2 | App [arm:7] exited with code [1] via signal [SIGINT]
PM2 | App [arm:7] starting in -fork mode-
PM2 | App [arm:7] online
7|arm | > shoping@0.1.0 start /home/hett/arm
7|arm | > react-scripts start
7|arm | ℹ 「wds」: Project is running at http://192.168.8.34/
7|arm | ℹ 「wds」: webpack output is served from
7|arm | ℹ 「wds」: Content not from webpack is served from /home/hett/arm/public
7|arm | ℹ 「wds」: 404s will fallback to /
7|arm | Starting the development server...
7|arm | events.js:187
7|arm | throw er; // Unhandled 'error' event
7|arm | ^
7|arm | Error: ENOSPC: System limit for number of file watchers reached, watch '/home/hett/arm/public'
7|arm | at FSWatcher.start (internal/fs/watchers.js:165:26)
7|arm | at Object.watch (fs.js:1329:11)
7|arm | at createFsWatchInstance (/home/hett/arm/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:38:15)
7|arm | at setFsWatchListener (/home/hett/arm/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:81:15)
7|arm | at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/hett/arm/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:233:14)
7|arm | at FSWatcher.NodeFsHandler._handleDir (/home/hett/arm/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:429:19)
7|arm | at FSWatcher.<anonymous> (/home/hett/arm/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:477:19)
7|arm | at FSWatcher.<anonymous> (/home/hett/arm/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:482:16)
7|arm | at FSReqCallback.oncomplete (fs.js:159:5)
7|arm | Emitted 'error' event on FSWatcher instance at:
7|arm | at FSWatcher._handleError (/home/hett/arm/node_modules/webpack-dev-server/node_modules/chokidar/index.js:260:10)
7|arm | at createFsWatchInstance (/home/hett/arm/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:40:5)
7|arm | at setFsWatchListener (/home/hett/arm/node_modules/webpack-dev-server/node_modules/chokidar/lib/nodefs-handler.js:81:15)
7|arm | [... lines matching original stack trace ...]
7|arm | at FSReqCallback.oncomplete (fs.js:159:5) {
7|arm | errno: -28,
7|arm | syscall: 'watch',
7|arm | code: 'ENOSPC',
7|arm | path: '/home/hett/arm/public',
7|arm | filename: '/home/hett/arm/public'
7|arm | }
7|arm | npm
7|arm | ERR! code ELIFECYCLE
7|arm | npm ERR!
7|arm | errno 1
7|arm | npm
7|arm | ERR! shoping@0.1.0 start: `react-scripts start`
7|arm | npm ERR!
7|arm | Exit status 1
7|arm | npm ERR!
7|arm | npm ERR! Failed at the shoping@0.1.0 start script.
7|arm | npm ERR!
7|arm | This is probably not a problem with npm. There is likely additional logging output above.
这是因为我修改了package.json这个文件导致的,因此需要重装
npm cache clean --force
rm -rf node_modules
rm -rf package-lock.json
npm install
或者是端口号重复了,更换端口号