首页 > 解决方案 > bin/sh: 1: webpack: 未找到

问题描述

我正在尝试将赛普拉斯测试添加到 CircleCI 管道。所以我在config.yml文件中使用了Cypress docker 镜像:

docker:
    - image: cypress/base:12

提交并触发 CircleCI 构建时,赛普拉斯测试成功运行。但是yarn build执行NODE_ENV=production webpack将失败并出现以下错误:

yarn run v1.22.4
$ NODE_ENV=production webpack
/bin/sh: 1: webpack: not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Exited with code exit status 127
CircleCI received exit code 127

webpack 和 webpack 相关的包在本地安装为 devDependencies。

提前致谢。

标签: dockerwebpackcypresscircleci

解决方案


推荐阅读