error: This is probably not a problem with npm. There is likely additional logging output above

后端 未结 14 2241
温柔的废话
温柔的废话 2020-12-13 20:34

In my project, I\'m using Angular6 for the frontend. Now what I\'m trying to do is deploy my project which is in remote server into the actual server. I\'m using npm r

14条回答
  •  -上瘾入骨i
    2020-12-13 21:14

    I'm new with react... Well i had the same output:

    Starting the development server...
    
    events.js:196
          throw er; // Unhandled 'error' event
          ^
    
    Error: ENOSPC: System limit for number of file watchers reached, watch '/opt/lampp/htdocs/react-tuto/public'
        at FSWatcher. (internal/fs/watchers.js:168:26)
        at Object.watch (fs.js:1351:34)
        at createFsWatchInstance (/opt/lampp/htdocs/react-tuto/node_modules/chokidar/lib/nodefs-handler.js:38:15)
        at setFsWatchListener (/opt/lampp/htdocs/react-tuto/node_modules/chokidar/lib/nodefs-handler.js:81:15)
        at FSWatcher.NodeFsHandler._watchWithNodeFs (/opt/lampp/htdocs/react-tuto/node_modules/chokidar/lib/nodefs-handler.js:233:14)
        at FSWatcher.NodeFsHandler._handleDir (/opt/lampp/htdocs/react-tuto/node_modules/chokidar/lib/nodefs-handler.js:429:19)
        at FSWatcher. (/opt/lampp/htdocs/react-tuto/node_modules/chokidar/lib/nodefs-handler.js:477:19)
        at FSWatcher. (/opt/lampp/htdocs/react-tuto/node_modules/chokidar/lib/nodefs-handler.js:482:16)
        at FSReqCallback.oncomplete (fs.js:165:5)
    Emitted 'error' event on FSWatcher instance at:
        at FSWatcher._handleError (/opt/lampp/htdocs/react-tuto/node_modules/chokidar/index.js:260:10)
        at createFsWatchInstance (/opt/lampp/htdocs/react-tuto/node_modules/chokidar/lib/nodefs-handler.js:40:5)
        at setFsWatchListener (/opt/lampp/htdocs/react-tuto/node_modules/chokidar/lib/nodefs-handler.js:81:15)
        [... lines matching original stack trace ...]
        at FSReqCallback.oncomplete (fs.js:165:5) {
      errno: -28,
      syscall: 'watch',
      code: 'ENOSPC',
      path: '/opt/lampp/htdocs/react-tuto/public',
      filename: '/opt/lampp/htdocs/react-tuto/public'
    }
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! react-tuto@0.1.0 start: `react-scripts start`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the react-tuto@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/paulo/.npm/_logs/2019-12-16T16_46_27_856Z-debug.log
    

    I just tried:

    sudo npm start
    

    And it worked.

提交回复
热议问题