angular-admin icon indicating copy to clipboard operation
angular-admin copied to clipboard

npm run dev 启动失败,报错

Open xmm228 opened this issue 6 years ago • 2 comments

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ ** ℹ 「wdm」: Compiled successfully. /Users/xiamingming/private/angular-admin/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:28 return (new fsevents(path)).on('fsevent', callback).start(); ^

TypeError: fsevents is not a constructor at createFSEventsInstance (/Users/xiamingming/private/angular-admin/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:28:11) at setFSEventsListener (/Users/xiamingming/private/angular-admin/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:82:16) at FSWatcher.FsEventsHandler._watchWithFsEvents (/Users/xiamingming/private/angular-admin/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:252:16) at FSWatcher. (/Users/xiamingming/private/angular-admin/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:386:25) at LOOP (fs.js:1530:14) at process._tickCallback (internal/process/next_tick.js:61:11) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] dev: ng serve --proxy-config proxy.conf.json --hmr npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] 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! /Users/xiamingming/.npm/_logs/2019-07-26T03_25_15_567Z-debug.log

xmm228 avatar Jul 26 '19 03:07 xmm228

安装依赖的也会有一个报错,dev的时候直接是报错起不来,安装依赖的报错大概是这样的 node-pre-gyp ERR! cwd /Users/xiamingming/private/angular-admin/node_modules/@angular/compiler-cli/node_modules/fsevents node-pre-gyp ERR! node -v v10.9.0 node-pre-gyp ERR! node-pre-gyp -v v0.12.0 node-pre-gyp ERR! not ok 异常尝试使用node 8.x的版本去执行,还是不行,烦请作者有时间帮忙看一下,非常感谢

xmm228 avatar Jul 26 '19 03:07 xmm228

翻墙吧,兄弟

zhenizhui avatar Jul 26 '19 05:07 zhenizhui