TypeError:path_to_regexp_WEBPACK_IMPORTED_MODULE_8_react___default.a.compile is not a function

TypeError:path_to_regexp_WEBPACK_IMPORTED_MODULE_8_react___default.a.compile is not a function

TypeError:path_to_regexp_WEBPACK_IMPORTED_MODULE_8_react___default.a.compile is not a function
相信很多小伙伴都会遇到这个bug,遇到bug的时候总是会有那么一点小急躁。
我们大多数程序员在敲代码的时候总是会用Vscode的习惯,当我们用Vscode终端npm start或者yarn start打开一个react文件的时候,有时候会报这个错TypeError:path_to_regexp_WEBPACK_IMPORTED_MODULE_8_react___default.a.compile is not a functionTypeError:path_to_regexp_WEBPACK_IMPORTED_MODULE_8_react___default.a.compile is not a function
然后我们把Vscode的终端ctrl+c停掉,然后选择这个右键这个项目到资源管理中心,在文件夹中搜cmd,然后用cmd命令重新启动这个项目npm start或者yarn start就不会在报错了!