我对哨兵 webpack 插件https://github.com/getsentry/sentry-webpack-plugin有问题......我已经阅读了手册并尝试了很多东西,但无法弄清楚出了什么问题......但是,我我使用 webpack 3 ... 每次我收到这个错误
./node_modules/@sentry/cli/sentry-cli 发布新的 1520006165 错误:需要组织 slug(与 --org 一起提供)
但是组织、项目、令牌由包含所有必需数据的 sentry.properties 文件提供给 SentryCliPlugin ... https://docs.sentry.io/clients/java/config/#configuration-via-properties-file
new SentryCliPlugin({
release: process.env.LAST_BUILD_TIME,
configFile: process.env.SENTRY_PROPERTIES_FILE,
include: './app/dist'
})
Run Code Online (Sandbox Code Playgroud)
sentry.properties 文件(添加)
[defaults]
url=https://sentry.io/
org=<YourOrgShortname>
project=<YourProjectShortname>
[auth]
token=<YourToken>
Run Code Online (Sandbox Code Playgroud)
感谢帮助!
编辑
我已经在 github repo 上打开了问题......这是与包相关的问题。 https://github.com/getsentry/sentry-webpack-plugin/issues/34
您的链接文档是错误的,因为它适用于 Java 客户端而不是 Java脚本。根据例外情况,您正在将 TS/JS 与 JS 一起使用。除了名字相似之外,他们彼此没有任何关系。
也可以使用.properties
节点驱动程序上的文件。但在这种情况下,我们需要将文件名传递到SentryCliPlugin
查找配置的位置,如下所示:
new SentryCliPlugin({
release: process.env.LAST_BUILD_TIME,
configFile: process.env.SENTRY_PROPERTIES_FILE,
include: './app/dist',
configFile: 'sentry.properties'
})
Run Code Online (Sandbox Code Playgroud)
但请记住,您还需要在文件中提供 url、组织和身份验证方式(如 auth-token)sentry.properties
:
defaults.url=http://SentryHost:9000
defaults.org=<YourOrganisationShortname>
defaults.project=<YourProjectShortname>
# Generate this on http://<SentryHost>:9000/api/
auth.token=xxx
Run Code Online (Sandbox Code Playgroud)
短名称可以在 Sentry 的设置以及 url 中确定。
归档时间: |
|
查看次数: |
2529 次 |
最近记录: |