1.通过正常的npm install /bower install步骤之后,输入gulp serve启动发现报以下截图中的错误
2.源于之前没有遇到过此类报错信息,进行报错关键词“const types = internalBinding(‘types’); ^ ReferenceError: internalBinding is not defined”进行搜索,发现有人遇到过和我一样的问题
*最终定位问题到本地node版本与项目版本不一致的关系,node版本从8.x升级到10.x导致启动报错
*解决方案是执行一遍以下命令再进行启动即可
npm install natives@1.1.6 --save-dev
最终解决。
参考资料:
https://www.imqianduan.com/nodejs/169.html
https://stackoverflow.com/questions/53146394/node-app-fails-to-run-on-mojave-referenceerror-internalbinding-is-not-defined
https://blog.csdn.net/wangjinbao123456/article/details/86525636