ember-cli-import-polyfill can break your imports - Developers’ Notes

iRonin IT Team - Experts in software development
developers notes, ember

If you encounter a problem with an external NPM package in an Ember project, make sure everyone is running the correct package version.

Today, one of our web application developers was helping a new colleague set up our Ember project and found an issue with one of the NPM packages. We use ember-simple-auth for authenticating users in the app and we didn’t pin it to the exact version in the package.json file - it was ^1.1.0 in our case. When the new team member ran npm install, he got a newer version (1.2.0) - different from what everyone else had. The authors of that new version added ember-cli-import-polyfill, which broke imports in our add-ons. We have a specific use case as we share common code between the app and our chrome extension using ember addons. These addons contain some other 3rd party add-ons and ember-cli-import-polyfill broke imports for us. We immediately reported that on the ember-simple-auth issue page. It turned out that the import polyfill is for Ember apps, not Ember add-ons. Hopefully it will be removed from ember-simple-auth on the next release - for now we pinned it to 1.1.0 in the repo. The moral of today’s battle: always pin external NPM package’s version in your package.json file :).

We hope you enjoyed today’s Developers’ Notes, delivered for your reading pleasure by Łukasz, iRonin’s Web Application Development Team Leader. There’s more coming soon, so stay tuned!

Author's Bio
iRonin IT Team

Experts in software development

We are a 100% remote team of software development experts, providing web & mobile application development and DevOps services for international clients.

Similar articles

Bulletproof your development with remote team augmentation

Read how
This page is best viewed in portrait mode
Our websites and web services use cookies. We use cookies and collected data to enhance your experience, provide additional communication channels, improve marketing materials and enhance our offer. IRONIN SP. Z O.O. SP. K. is committed to protecting all the data that we collect or process in any way, especially data of personal nature. By accepting these terms you agree to our usage of cookies and processing your data, according to our Privacy Policy, and you declare that your browser settings reflect your preferences. Read more You have the right to revoke this agreement at any time, based on the terms of our Privacy Policy. You can change cookies settings in your browser. If you do not agree with us using cookies and processing your data, please change your cookies settings in your web browser and reject these terms. You can find more information about cookies, your data privacy This site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies. data processing, and your rights in our Privacy Policy.