surmon-china / angular-admin

🔏 Admin client for surmon.me blog powered by @angular and Bootstrap4
MIT License
354 stars 113 forks source link

npm run dev 启动失败,报错 #27

Open xmm228 opened 5 years ago

xmm228 commented 5 years ago

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! angular-admin@3.2.0 dev: ng serve --proxy-config proxy.conf.json --hmr npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the angular-admin@3.2.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! /Users/xiamingming/.npm/_logs/2019-07-26T03_25_15_567Z-debug.log

xmm228 commented 5 years ago

安装依赖的也会有一个报错,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的版本去执行,还是不行,烦请作者有时间帮忙看一下,非常感谢

zhenizhui commented 5 years ago

翻墙吧,兄弟