Firebase javascript sdk Docker container error whilst building react app

205 views
Skip to first unread message

Jordy Koppen

unread,
Apr 13, 2017, 8:39:44 AM4/13/17
to Firebase Google Group

since this morning I'm encountering an error in the build process of my React application using Bitbucket Pipelines. Nothing has changed to my applications other than a few tweaks that has should not trigger this error.

When I try to build my app locally I don't get any errors whatsoever. Beneath you can find the error NPM throws in Pipelines.


+ npm run build-debug
npm info it worked if it ends with ok
npm info using n...@2.15.9
npm info using no...@v4.6.0
npm info prebuild-debug webp...@0.1.2
npm info build-debug webp...@0.1.2
> webp...@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 webp...@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! webp...@0.1.2 build-debug: `node scripts/build-debug.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the webp...@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


Thanks in advance!

Kato Richardson

unread,
Apr 13, 2017, 12:55:41 PM4/13/17
to Firebase Google Group
Hi Jordy,

Looks like an npm packaging issue, but promise-polyfill is certainly registered. Maybe the environment is using an alternate registry?

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/29ca49d1-837b-4156-a926-7d3c277ff3ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Kato Richardson

unread,
Apr 13, 2017, 12:59:05 PM4/13/17
to Firebase Google Group
Another thought: Is it possible to ssh into the remote machine and try the npm command manually? If so, you might installing with --verbose or grab the npm debug log for some additional details.

TZMANICS ..

unread,
Apr 15, 2017, 11:10:50 AM4/15/17
to Firebase Google Group
I'm getting this same error in my angular app
```ERROR in ./~/firebase/app/shared_promise.js
Module not found: Error: Can't resolve 'promise-polyfill' in '/Users/tmanicsi/Documents/PROGRESS/DEVREL/projects/blog-posts/attack-authorization/node_modules/firebase/app'
 @ ./~/firebase/app/shared_promise.js 22:35-62
 @ ./~/firebase/app/firebase_app.js
 @ ./~/firebase/app.js
 @ ./~/firebase/firebase-browser.js
 @ ./~/angularfire2/angularfire2.js
 @ ./~/angularfire2/index.js
 @ ./src/app/app.module.ts
 @ ./src/main.ts
 @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts```

I'm getting this locally and when I try to build. I started with a clean app from the angular-cli & immediately get this error when adding & initializing firebase. I've tried clearing `node_modules` & re-installing, as well as installing `promise-polyfill` on it's own. No obvious errors & no solutions ☹️

Appreciative of any insight or updates!
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/29ca49d1-837b-4156-a926-7d3c277ff3ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Byron Dover

unread,
Apr 15, 2017, 3:23:39 PM4/15/17
to Firebase Google Group
Firebase JavaScript SDK 3.7.8 dropped promise-polyfill as an npm package peer dependency, for some reason. It would appear it's still required. 

As a workaround, either install promise-polyfill, or downgrade firebase.

npm install promise-polyfill --save-exact

or

npm install fire...@3.7.7 --save-exact

Hopefully this gets fixed upstream in the next firebase npm package release! 

TZMANICS ..

unread,
Apr 17, 2017, 6:52:59 PM4/17/17
to Firebase Google Group
Thank you! Worked like a charm. Before posting this I had tried installing `promise-polyfill` into Firebase's `node_modules` folder 😝
I definitely hope this gets fixed. Again, thanks for the quick response. Much appreciated!
Reply all
Reply to author
Forward
0 new messages