I have a custom NPM package that has ECMA scrip… low and behold on IE this dies. With meteor we’ve spoilt with the ecmascript package… so this stuff works. Can anyone please explain how how do this in my NPM custom package so I can support this?
@benjamn I moved that issue here… I actually converted my package to ES5 in frustration and moved my project back to Meteor 1.6.1 and now I am hitting errors with 3rd part packages like Google Firebase "@firebase/messaging": "^0.3.5", on IE11 eg it does not class.
Do have something setup incorrectly that ecmascript package is not doing it’s work… or just does not work this way?
The 1.7 release notes cover this use case, which seems to be a question of how to make ecmascript work with modern JavaScript npm packages. Not on my computer, so I may have missed something!
@robfallows thanks… yep, hoping it’s supported just need to better understand (explanation or dummies) how to do it for
Custom NPM package we create that are in package.json
3rd party NPM packages in the package.json - is there a way to get
Also is there a way to have a NPM module in package.json and keep it server only? eg we Firebase in the package.json but we only need on the server. I know how how to do this in a Meteor package but not clear on how I do this for NPM packages. Maybe the only way to do this is wrap the NPM package in a Meteor package?
thanks
Update: here’s an example of an error that I am experiencing on IE11 (works on other Modern browsers)
@robfallows@benjamn it seems like the setMinimumBrowserVersionsi s not kicking into action ie11… is there something I am missing? I have it running on the server… I have tried both inside/not-inside Meteor.startup
I am basing this on the fact above that there’s ES6 content showing up in the IE11 browser console.
I was specifically referring to the technique of taking an npm package and processing it with ecmascript. That’s not the same as the ability to deliver legacy and modern JavaScript bundles.
@robfallows sorry some intertwined issues… I managed to make some progress.
ps. umm hoping you did not have to read this on mobile… appreciate the responses
TO try and debug this I tried to downgrade my project back to Meteor 1.6.1.3. So I have 3 categories of interrelated issues:
the NPM packages that have ECMA script in… from the origial part of the thread I understand that I can create a file link to the folders in node_modules and Meteor should convert these from ES6 to ES5. I ended up converting me custom NPM module to ES5 manuually so I could try and resolve the other categories of issues
With Meteor 1.7.1 IE11 is complaining about a bunch of standard Meteor packages containing ES6 code. So it seems like IE is either not using the legacy bundle or something wrong in the conversion
With Meteor 1.6.1.3 - I can run this on IE11 on my local machine (Mac with VMware) and it works. When I try and run it from Galaxy I am getting the following issue
When I click the link it shows some Meteor generated code that containes r={...t}; so something borked in the conversion
In my downgrade process I had an issue as I had a left of modules@0.11.3 in my .meteor/packages which seemed to be the culprit, as I already had ecmascript@0.10.6 , so not sure if some sort of conflict that was breaking it. Once removed, when using Meteor 1.6.1.3 works locall (even with --production flag) but does nto work from galaxy. (as usual it works fine on Chrome, Safari etc)
Perhaps another mismatch in my packages/versions…
# Meteor packages used by this project, one per line.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
service-configuration@1.0.11
sacha:spin
underscore@1.0.10
manuelschoebel:cheerio
accounts-twitter@1.4.1
mrt:twit
mrt:twilio-meteor
alisalaah:hogan
accounts-facebook@1.3.1
accounts-password@1.5.0
meteorhacks:unblock
raix:ui-dropped-event
fastclick@1.0.13
mquandalle:ismobile
http@1.4.0
sakulstra:aggregate
reywood:publish-composite
bozhao:accounts-instagram
raix:handlebar-helpers
oauth2@1.2.0
maxharris9:connection-banner
adamgins:microsoft-oauth
johnantoni:meteor-appear
copleykj:jquery-autosize
djedi:sanitize-html
webapp@1.5.0
random@1.1.0
linto:jquery-ui
buzzy-buzz:google-api
reactive-var@1.0.11
meteorhacks:subs-manager
dburles:google-maps
browser-policy@1.1.0
mdg:geolocation
mizzao:timesync
meteor-base@1.3.0
mobile-experience@1.0.5
mongo@1.4.2
blaze-html-templates
session@1.1.7
tracker@1.1.3
logging@1.1.19
ejson@1.1.0
spacebars
check@1.3.0
less@2.7.11
lukemadera:social-share
harrison:papa-parse
meteorhacks:inject-initial
natestrauser:filepicker-plus
jparker:crypto-sha256
jparker:crypto-hmac
froatsnook:request
buzzy-buzz:resources-core
pfafman:filesaver
simple:reactive-method
buzzy-buzz:avatar
peppelg:bootstrap-3-modal
dispatch:deep-link
jquery@1.11.10
iron:router
okgrow:router-autoscroll
shell-server@0.3.1
boilerplate-generator@1.4.0
tsega:bootstrap3-datetimepicker
barbatus:stars-rating
froala:editor-reactive
raix:push
facebook-config-ui@1.0.1
twitter-config-ui@1.0.0
accounts-google@1.3.1
google-config-ui@1.0.0
email@1.2.3
cunneen:signature-pad
dynamic-import@0.3.0
buzzy-buzz:styleguide
mdg:seo
nimble:restivus
buzzy-buzz:ibmconnectionscloud-oauth
buzzy-buzz:ibm-watson-workspace-oauth
buzzy-buzz:slack-oauth
ostrio:files@1.7.17
risul:dropzone
buzzy-buzz:ibmconnectionsonprem-oauth
ostrio:meteor-root
okgrow:analytics
es5-shim@4.7.0
buzzy-buzz:ibmconnectionscloud-oauth-default
simple:rest
simple:rest-accounts-password
crosswalk@1.7.1
standard-minifier-js
minifier-js
ecmascript@0.10.6
I just tried blitzing the versions file… stil seems to be working when I hit my local version, but the Galaxy version still has some ES6 stuff in it… eg see https://debug.buzzy.buzz as an example.
@robfallows@benjamn I managed to get a downgraded version working… by replacing/merging my ./meteor/packages and ./meteor/versions with my old working version on Meteor 1.6.1.3
There were a few packages which were at different versions that got upgraded when moving to 1.7.1-rc2 that were obviously causing babel not to work. I have not isolated which one it was. If I search my project for .babelrc two npm packages come up estraverse & csv-parse.
So I am still in need of some idiots guide for
how to get my custom NPM package in Meteor working with babel (i tried the imports way but it does not seem to work)… do I need to have a .babelrc and some scripts?
How to resolve the issues on 1.7.1 where base meteor packages like accounts-oauth stopped getting converted to ES5 for legacy browsers… or the legacy bundle was not being used by IE11
Meteor does not recompile the contents of node_modules by default. If you’re using Meteor 1.7+, and you want to compile an npm package, you should use one of the techniques described here:
I have 2 issues with 1.7: 1) meteor packages don’t seem to convert to ES5 on IE 2) my imports using symbolic links did not seem to work either.
I am probably doing something silly but I have an inclination that somehow I have a package version issue that’s causing the issue… as I got this with Meteor 1.6.1 until I revered to my original package version from an old branch. I isolated it down to approx 10 package version… but never go to identify the exact one. This was on 1.6.1.3
I can try and re-upgrade the working package to 1.7.1 and see if the same issue presents.