提问人:Jack Chang 提问时间:2/1/2023 更新时间:2/1/2023 访问量:98
Dockerfile 中的 RUN npm run-script build 返回了非零代码:2
RUN npm run-script build within Dockerfile returned a non-zero code: 2
问:
Docker 构建作为 bitbucket 管道中的一个步骤运行。
之后,控制台返回以下错误。RUN npm run-script build
node_modules/@types/bluebird/index.d.ts(44,27): error TS1256: A rest element must be last in a tuple type.
The command '/bin/sh -c npm run-script build' returned a non-zero code: 2
package.json 中 devDependencies 的一部分:
"typescript": "^4.9.5",
"@typescript-eslint/eslint-plugin": "^5.50.0",
"@typescript-eslint/parser": "^5.50.0",
@type/bluebird 作为依赖项安装在 package-lock.json 中
"@types/bluebird": {
"version": "3.5.33",
"resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.33.tgz",
"integrity": "sha512-ndEo1xvnYeHxm7I/5sF6tBvnsA4Tdi3zj1keRKRs12SP+2ye2A27NDJ1B6PqkfMbGAcT+mqQVqbZRIrhfOp5PQ=="
},
任何帮助将不胜感激
我在本地尝试了docker build,没有任何问题。 我还升级了打字稿,@typescript-eslint/eslint-plugin 和 @typescript-eslint/parser 到最新版本。同样的错误。
答: 暂无答案
评论