打包上线报错TypeError: Cannot read properties of null (reading 'insertBefore')和TypeError: Cannot read properties of null (reading 'emitsOptions')

开发环境没问题,但是打包上线后,在切换路由的时候, **TypeError: Cannot read properties of null (reading ‘insertBefore’)和TypeError: Cannot read properties of null (reading ‘emitsOptions’)**报这两个错 但是刷新过后就正常了

我也有同样的问题,你有解决方法了吗