I am creating SPFX webpart. Without doing any code changes i am executing gulp serve. I am getting below error for this. What could be the issue?
GULP version:
CLI version: 2.2.0 Local version: 4.0.2
I suspect you're using node 12 and gulp 3. That combination does not work: https://github.com/gulpjs/gulp/issues/2324
A previous workaround from Jan. does not work either: https://github.com/gulpjs/gulp/issues/2246
Solution: Either upgrade to gulp 4 or downgrade to an earlier node.
I assume that you are using NodeJS 12.
The current supported LTS version of NodeJS for the SharePoint Framework is Node.js v8.x and Node.js v10.x (recommended). Node.js v12.x is not currently supported. Notice that Node.js 9.x or 11.x versions are also not supported with SharePoint Framework development.