Error when running gulp serve , when implementing SPFX with Angular 4
Implementing SPFX with Angular 4 using the below link : https://blog.hubfly.com/solutions/how-to-integrate-sharepoint-framework-spfx-with-angular-4.
Getting the below error after running the gulp serve command.
[14:40:54] Starting 'serve'... [14:40:54] Starting gulp [14:40:54] Starting subtask 'configure-sp-build-rig'... [14:40:54] Finished subtask 'configure-sp-build-rig' after 9.63 ms [14:40:54] Starting subtask 'spfx-serve'... Starting api server on port 5432. Registring api: /getwebparts Registring api: /. Registring api: /workbench [14:40:55] Error - [spfx-serve] Error: Invalid glob argument: [14:40:55] Error - 'spfx-serve' sub task errored after 488 ms Invalid glob argument: [14:40:55] 'serve' errored after 514 ms [14:40:55] About to exit with code: 1 Process terminated before summary could be written, possible error in async code not continuing! Trying to exit with exit code 1
Kindly suggest where to fix to go ahead.
We are researching on this and will update you the latest progress.
ok Thanks . please do update
This is happening for me too, I was having issue with gulp trust-dev-cert, so I uninstalled gulp and installed again. Then it got resolved. When I type gulp serve, I get this error.
Build target: DEBUG [16:25:14] Starting 'serve'... [16:25:14] Starting gulp [16:25:14] Starting subtask 'configure-sp-build-rig'... [16:25:14] Finished subtask 'configure-sp-build-rig' after 6.7 ms [16:25:14] Starting subtask 'spfx-serve'... [16:25:14] Starting server... Starting api server on port 5432. Registring api: /workbench Registring api: / [16:25:14] Error - [spfx-serve] Error: Invalid glob argument: [16:25:14] Error - 'spfx-serve' sub task errored after 563 ms Invalid glob argument: [16:25:14] 'serve' errored after 578 ms [16:25:14] About to exit with code: 1 Process terminated before summary could be written, possible error in async code not continuing! Trying to exit with exit code 1
Please help me.
### Update: I have fixed it by downgrading the gulp version to 3.9.1. It seems Gulp v4 is not supported. Here's what happened: I got 4 high vulnerabilities when I did npm install gulp (version 3.9.1). Therefore I uninstalled it and installed gulp@latest. It removed all those vulnerabilities. The installed gulp version is 4.0.0. When I did "gulp serve", it throws this error.
The vulnerabilities are on the package "minimatch". The command "npm audit" tells me like below;
=== npm audit security report ===
Run npm install [email protected] to resolve 5 vulnerabilities SEMVER WARNING: Recommended action is a potentially breaking change
High Regular Expression Denial of Service Package minimatch Dependency of gulp Path gulp > vinyl-fs > glob-stream > glob > minimatch More info https://nodesecurity.io/advisories/118
High Regular Expression Denial of Service Package minimatch Dependency of gulp Path gulp > vinyl-fs > glob-stream > minimatch More info https://nodesecurity.io/advisories/118
High Regular Expression Denial of Service Package minimatch Dependency of gulp Path gulp > vinyl-fs > glob-watcher > gaze > globule > glob > minimatch More info https://nodesecurity.io/advisories/118
High Regular Expression Denial of Service Package minimatch Dependency of gulp Path gulp > vinyl-fs > glob-watcher > gaze > globule > minimatch More info https://nodesecurity.io/advisories/118
Low Prototype Pollution Package lodash Dependency of gulp Path gulp > vinyl-fs > glob-watcher > gaze > globule > lodash More info https://nodesecurity.io/advisories/577
found 5 vulnerabilities (1 low, 4 high) in 740997 scanned packages 5 vulnerabilities require semver-major dependency updates.
hi , Thanks will try and update.
It seems the issue have been fixed, so close it now. Please feel free let me know if it still exist and I will reopen it for you.
Hi,
I got the following error while trying out "gulp serve"
Build target: DEBUG [12:12:22] Using gulpfile D:\custom-list\TestCRUDApp\gulpfile.js [12:12:22] Starting 'serve'... [12:12:22] Starting gulp [12:12:23] Starting subtask 'configure-sp-build-rig'... [12:12:23] Finished subtask 'configure-sp-build-rig' after 49 ms [12:12:23] Starting subtask 'spfx-serve'... [12:12:26] Starting server... Starting api server on port 5432. Registring api: /workbench Registring api: / [12:12:28] Error - [spfx-serve] Error: Invalid glob argument: [12:12:28] Error - 'spfx-serve' sub task errored after 5 s Invalid glob argument: [12:12:28] 'serve' errored after 5.1 s [12:12:28] About to exit with code: 1 Process terminated before summary could be written, possible error in async code not continuing! Trying to exit with exit code 1
I although I did manage to resolve it by reverting the gulp version from 4.0.0 to 3.9.1, my question is doesn't the gulp 4.0.0 resolve the issue of the local workbench not working.
Please guide as I feel I might be missing and there might be a workaround for the the gulp 4.0.0!!
Thanks
Hi, Just install 3.9.1 version of gulp, if you've latest version
npm install [email protected] or npm install [email protected] -g
It resolve the same issue for me.
Hi,
Thanks a lot!!
Hi, Just install 3.9.1 version of gulp, if you've latest version
npm install [email protected] or npm install [email protected] -g
It resolve the same issue for me.
Hello,
I get the below error after installing 3.9.1
gulp serve Build target: DEBUG [22:38:36] Using gulpfile D:\spfx\Image-Gallery\gulpfile.js TypeError: Cannot read property 'apply' of undefined at C:\Users\user\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:129:20 at process._tickCallback (internal/process/next_tick.js:61:11) at Function.Module.runMain (internal/modules/cjs/loader.js:834:11) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3) [22:38:36] Error - Unknown Cannot read property 'apply' of undefined [22:38:36] ==================[ Finished ]================== Error - Unknown Cannot read property 'apply' of undefined [22:38:37] Project image-gallery version:0.0.1 [22:38:37] Build tools version:3.9.26 [22:38:37] Node version:v10.16.3 [22:38:37] Total duration:5.3 s [22:38:37] Task errors:2 TypeError: localCache.gulp.stop is not a function at writeSummary (D:\spfx\Image-Gallery\node_modules@microsoft\gulp-core-build\lib\logging.js:261:37) at afterStreamsFlushed (D:\spfx\Image-Gallery\node_modules@microsoft\gulp-core-build\lib\logging.js:188:21) at afterStreamFlushed (D:\spfx\Image-Gallery\node_modules@microsoft\gulp-core-build\lib\logging.js:129:13) at Timeout.setTimeout [as _onTimeout] (D:\spfx\Image-Gallery\node_modules@microsoft\gulp-core-build\lib\logging.js: 111:17) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10) [22:38:37] Error - Unknown localCache.gulp.stop is not a function D:\spfx\Image-Gallery\node_modules@microsoft\gulp-core-build\lib\logging.js:261 localCache.gulp.stop(); ^
TypeError: localCache.gulp.stop is not a function at writeSummary (D:\spfx\Image-Gallery\node_modules@microsoft\gulp-core-build\lib\logging.js:261:37) at writeSummary (D:\spfx\Image-Gallery\node_modules@microsoft\gulp-core-build\lib\logging.js:197:13) at process.on (D:\spfx\Image-Gallery\node_modules@microsoft\gulp-core-build\lib\logging.js:258:13) at process.emit (events.js:203:15) at process.EventEmitter.emit (domain.js:448:20) at process._fatalException (internal/bootstrap/node.js:496:27)
Below show the current version of gulp
PS D:\spfx\Image-Gallery> gulp -v [22:38:57] CLI version 3.9.1 [22:38:57] Local version 4.0.2
Having the same problem
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues