Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
带有@Sentry/webpack插件和heroku的Sentry_Heroku_Webpack_Sentry - Fatal编程技术网

带有@Sentry/webpack插件和heroku的Sentry

带有@Sentry/webpack插件和heroku的Sentry,heroku,webpack,sentry,Heroku,Webpack,Sentry,我正在使用webpack构建我的应用程序,它与@sentry/webpack plugin一起在本地工作–它自动生成版本并将sourcemaps上传到sentry 但是,如果我试图在Heroku上构建相同的应用程序,则会出现以下错误: Error: Command failed: /tmp/build_e3ae44a78c063d6493d3fdfc983bd8d6/client/node_modules/@sentry/cli/sentry-cli releases propose-versi

我正在使用webpack构建我的应用程序,它与
@sentry/webpack plugin
一起在本地工作–它自动生成版本并将sourcemaps上传到sentry

但是,如果我试图在Heroku上构建相同的应用程序,则会出现以下错误:

Error: Command failed: /tmp/build_e3ae44a78c063d6493d3fdfc983bd8d6/client/node_modules/@sentry/cli/sentry-cli releases propose-version
  INFO    2019-04-16 13:33:13.141611957 +00:00 Loaded config from /tmp/build_e3ae44a78c063d6493d3fdfc983bd8d6/client/.sentryclirc
  DEBUG   2019-04-16 13:33:13.141666891 +00:00 sentry-cli version: 1.41.0, platform: "linux", architecture: "x86_64"
  INFO    2019-04-16 13:33:13.141684793 +00:00 sentry-cli was invoked with the following command line: "/tmp/build_e3ae44a78c063d6493d3fdfc983bd8d6/client/node_modules/@sentry/cli/sentry-cli" "releases" "propose-version"
  DEBUG   2019-04-16 13:33:13.141916192 +00:00 error: running update nagger
  DEBUG   2019-04-16 13:33:13.141939514 +00:00 skipping update nagger because session is not attended
error: Could not automatically determine release name
  DEBUG   2019-04-16 13:33:13.142576118 +00:00 client close; no transport to shut down  (from sentry)
    at ChildProcess.exithandler (child_process.js:289:12)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:962:16)
    at Socket.stream.socket.on (internal/child_process.js:381:11)
    at Socket.emit (events.js:182:13)
    at Pipe._handle.close (net.js:606:12)

我做错了什么?

当我使用慢速互联网连接进行构建时,我也遇到了同样的问题。
此外,请检查您正在使用的API令牌是否具有中的写入权限。您可以通过在插件配置中手动指定发布名称来解决此问题:

const version = require('../VERSION').version;

webpackConfig.plugins.push(new SentryWebpackPlugin({
  include: '../src',
  ignoreFile: '.sentrycliignore',
  ignore: ['node_modules', 'webpack.config.js'],
  configFile: '.sentryclirc',
  release: version
}));
当我们运行
npm运行release
时,我们使用一个名为的模块来构建一个版本文件。下面是我们用于此目的的
.release it.json
配置文件:

{
  "non-interactive": true,
  "npm": {
    "publish": false
  },
  "use": "git.tag",
  "pkgFiles": null,
  "scripts": {
    "afterBump": "echo module.exports = {version: \"'\"${version}\"'\"} > $(git rev-parse --show-toplevel)/VERSION"
  },
  "git": {
    "commitMessage": "release: v${version}",
    "requireCleanWorkingDir": false,
    "tagName": "v${version}"
  }
}