发布图像时出现错误
2021-04-07T06:30:58.443089+00:00 heroku[web.1]: Starting process with command `node index.js`
2021-04-07T06:31:01.899268+00:00 app[web.1]: Error: Exec format error
Run Code Online (Sandbox Code Playgroud)
我回到了只需要 Express 的最简单的 node.js 代码。无法理解它可能有什么问题。
设置如下:
WORKDIR /app
COPY package.json .
RUN npm install
COPY index.js .
CMD ["node", "index.js"]
Run Code Online (Sandbox Code Playgroud)
{
"name": "SigningV2",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "", …Run Code Online (Sandbox Code Playgroud)