如何纠正运行md-to-pdf的Bitbucket管道中的错误

问题描述 投票:0回答:1

尝试在Bitbucket Pipeline脚本(请参见下面的脚本)中运行md-to-pdf(请参见https://www.npmjs.com/package/md-to-pdf)时出现以下错误。

错误

ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. 
See https://crbug.com/638180.

bitbucket-pipelines.yaml文件

image: buildkite/puppeteer:v1.15.0

pipelines:
  default:
    - step:
        caches:
          - node
        script:
          - npm install -g md-to-pdf
          - doc="appendix"
          - md-to-pdf --config-file config.json ${doc}.md ${doc}.pdf

config.json文件

我试图按照说明进行操作。此config.json格式错误吗?

{
  "launch_options": {
    "args": ["no-sandbox"]
  }
}
puppeteer bitbucket-pipelines
1个回答
0
投票

正确的语法是:

{
  "launch_options": {
    "args": ["--no-sandbox"]
  }
}
© www.soinside.com 2019 - 2024. All rights reserved.