我目前正在通过教程进行操作,并且注意到运行npm run dev时,babel-watch server.js继续失败。我已经卸载/重新安装了babel-cli babel-preset-env和babel-watch,但没有成功。错误的输出是
npm run dev
> back-end@1.0.0 dev /home/pietto/back-end
> babel-watch server.js
Watcher failure { Error: watch server.js ENOSPC
at FSWatcher.start (fs.js:1382:19)
at Object.fs.watch (fs.js:1408:11)
at createFsWatchInstance (/home/pietto/back-end/node_modules/chokidar /lib/nodefs-handler.js:37:15)
at setFsWatchListener (/home/pietto/back-end/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/pietto/back-end/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at FSWatcher.NodeFsHandler._handleFile (/home/pietto/back-end/node_modules/chokidar/lib/nodefs-handler.js:255:21)
at FSWatcher.<anonymous> (/home/pietto/back-end/node_modules/chokidar /lib/nodefs-handler.js:473:21)
at FSReqWrap.oncomplete (fs.js:153:5)
errno: 'ENOSPC',
code: 'ENOSPC',
syscall: 'watch server.js',
filename: 'server.js' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! back-end@1.0.0 dev: `babel-watch server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the back-end@1.0.0 dev 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/pietto/.npm/_logs/2018-10-12T19_20_06_169Z-debug.log
答案 0 :(得分:0)
经过一番审查,确定我在后台运行了多个babel.rc进程。一旦我杀死了这些过程,就可以很好地工作