我找到了在Heroku上使用剧作家的解决方案,因为playwright buildpack已经过时了。
注意
这是针对即使您将BuildPack安装到Heroku
的人,但仍在低于错误的人
╔═════════════════════════════════════════════════════════════════════════╗
║ Looks like Playwright Test or Playwright was just installed or updated. ║
║ Please run the following command to download new browsers: ║
║ ║
║ npx playwright install ║
║ ║
║ <3 Playwright Team ║
╚═════════════════════════════════════════════════════════════════════════╝
简而言之,
如果您有一个:
libgtk-3-0
libasound2
libxcomposite1
libxdamage1
libxfixes3
libxrandr2
libxtst6
libatk1.0-0
libdbus-glib-1-2
libwayland-server0
libx11-xcb1
libxcursor1
libxi6
(如果您还没有的话,可选)
添加引擎(package.json
):
"engines": {
"node": "16.x",
"yarn": "1.x" // Could be npm, choose for your environment
},
就是这样。