-
Creator 版本: 3.8.2
-
目标平台: 编辑器预览
-
重现方式:
通过npm 安装 sentry:npm install @sentry/browser @sentry/tracing
-
在项目里进行sentry初始:
import * as Sentry from "@sentry/browser";
class _ErrorReportMgr {
// ...其他
start () {
Sentry.init({
dsn: 'http://...',
environment: 'dev',
tracesSampleRate: 1.0,
});
}
}
如上图所示,尝试进行 Sentry.init() 时,会报如下错误:
2024-04-23 16:43:56 [Scene] TypeError: Sentry.init is not a function
有相关经验的同学吗?