0

从今天早上开始,我在使用 Bitbucket Pipelines 构建 React 应用程序的过程中遇到了错误。除了一些不应触发此错误的调​​整外,我的应用程序没有任何变化。

当我尝试在本地构建我的应用程序时,我没有收到任何错误。在下面你可以找到 NPM 在 Pipelines 中抛出的错误。

+ npm run build-debug
npm info it worked if it ends with ok
npm info using npm@2.15.9
npm info using node@v4.6.0
npm info prebuild-debug webplayer@0.1.2
npm info build-debug webplayer@0.1.2
> webplayer@0.1.2 build-debug /opt/atlassian/pipelines/agent/build
> node scripts/build-debug.js
Creating an optimized production build...
Failed to compile.
Module not found: Error: Cannot resolve module 'promise-polyfill' in /opt/atlassian/pipelines/agent/build/node_modules/firebase/app
npm info webplayer@0.1.2 Failed to exec build-debug script
npm ERR! Linux 4.9.16-coreos-r1
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build-debug"
npm ERR! node v4.6.0
npm ERR! npm  v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! webplayer@0.1.2 build-debug: `node scripts/build-debug.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the webplayer@0.1.2 build-debug script 'node scripts/build-debug.js'.
npm ERR! This is most likely a problem with the webplayer package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/build-debug.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs webplayer
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls webplayer
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     /opt/atlassian/pipelines/agent/build/npm-debug.log

提前致谢!

4

1 回答 1

0

对于遇到此问题的人,我找到了解决方法。我们公司所有使用 firebase 的项目都无法通过 bitbucket 管道或 Docker 容器。经过一些研究,由于某种原因,promise-polyfillNode 4.0.0 注册表中不再存在 npm 包或其他什么?我们将容器镜像更新到 Node 版本 7.9.0,现在一切正常!

于 2017-04-15T12:07:36.213 回答