Skip to content
This repository has been archived by the owner on Dec 21, 2022. It is now read-only.

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

Open
xmm228 opened this issue Jul 26, 2019 · 2 comments
Open

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

xmm228 opened this issue Jul 26, 2019 · 2 comments

Comments

@xmm228
Copy link

xmm228 commented Jul 26, 2019

** 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
Copy link
Author

xmm228 commented Jul 26, 2019

安装依赖的也会有一个报错,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
Copy link

翻墙吧,兄弟

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants