Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/35.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
Node.js Heroku找不到剧作家文件_Node.js_Docker_Heroku_Deployment_Playwright - Fatal编程技术网

Node.js Heroku找不到剧作家文件

Node.js Heroku找不到剧作家文件,node.js,docker,heroku,deployment,playwright,Node.js,Docker,Heroku,Deployment,Playwright,My TypeScript NodeJS(>=12.0.0)应用程序使用(^1.4.2)。它在本地运行良好。但是,它在Heroku上失败了: browserType.launch: Failed to launch chromium because executable doesn't exist at /app/.cache/ms-playwright/chromium-799411/chrome-linux/chrome Try re-installing playwright with

My TypeScript NodeJS(>=12.0.0)应用程序使用(^1.4.2)。它在本地运行良好。但是,它在Heroku上失败了:

browserType.launch: Failed to launch chromium because executable doesn't exist at /app/.cache/ms-playwright/chromium-799411/chrome-linux/chrome

Try re-installing playwright with "npm install playwright"

Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.

at BrowserType._wrapApiCall (/app/node_modules/playwright/lib/client/channelOwner.js:78:15)

at BrowserType.launch (/app/node_modules/playwright/lib/client/browserType.js:49:21)

at Object.exports.browserTest (/app/utils.js:34:57)

at Object.<anonymous> (/app/index.js:13:9)

at Module._compile (internal/modules/cjs/loader.js:1076:30)

at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)

at Module.load (internal/modules/cjs/loader.js:941:32)

at Function.Module._load (internal/modules/cjs/loader.js:782:14)

at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
browserType.launch:无法启动chrome,因为/app/.cache/ms playright/chromium-799411/chrome linux/chrome上不存在可执行文件
尝试使用“npm安装剧作家”重新安装剧作家
注意:使用DEBUG=pw:api环境变量并重新运行以捕获剧作家日志。
在BrowserType.\u调用(/app/node\u modules/playright/lib/client/channelOwner.js:78:15)
在BrowserType.launch(/app/node_modules/playright/lib/client/BrowserType.js:49:21)
在Object.exports.browserTest(/app/utils.js:34:57)
反对。剧作家特别喜欢。然后我尝试了一千件我已经忘记的事情(编辑:包括)


以前有人遇到过这个问题吗?

alterjun和MaxSchmitt指出,构建包很重要。我以前试过,但一定是做错了什么,但现在它工作了。

这有帮助吗?谢谢,@altarjun,但我已经试过了。嗨,剧作家Heroku buildpack的作者,你是否将buildpack作为你的buildpack列表中的第一个?顺序很重要,否则浏览器将无法正确安装和找到@MaxSchmitt我以为我已经试过了,但今天我又试了一次,结果成功了。也许我以前做错了什么。谢谢