I am upgrading Meteor from version 1.5.1 to 126.96.36.199. Had faced few issues while upgrading as below:
- ssrwpo:uglifyjs2 babel constraint. This was fixed by locally overriding the package & updating the babel constraint to 7.0.7. Referred this.
- Babel compiler issue was fixed by following babel upgrade steps as mentioned here.
- WebAppInternals.getBoilerplate was returning stream instead of string as before. So html-minifier stopped working as it expected string. So fixed it by converting stream to string & promise as it became async.
After this the app was working properly locally using the command:
meteor --settings settings-default.json
But when deployed my code to Heroku, the client side app fails with errors specifying that lot of modules like meteor-base, babel-runtime, ecmascript-runtime etc were not loaded. Browser console shows this error (an example of babel-runtime error):
Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
(anonymous) @ babel-runtime.js?hash=ad2513735fa8d9d75196ab30ea0bd927586919be:17
(anonymous) @ babel-runtime.js?hash=ad2513735fa8d9d75196ab30ea0bd927586919be:149
When I checked line 17 of babel-runtime it shows below code of which modules is undefined which is why it fails:
var meteorInstall = Package.modules.meteorInstall;
So I tried the same on local using command & got the same issues on local:
meteor --settings settings-default.json --production
Can someone please help or point out what could be happening here with --production flag?