The stats-lite npm package is using ECMA2015 features, and Meteor node.js version does not support const, let and other ECMA2015 features.
I’m pretty sure the ecmascript meteor smart package does nothing about npm packages.
If you look at the “engines” section on the package json you’ll see
"engines": {
"node": ">=2.0.0"
},
This “>= 2.0.0” means that this code runs on io.js 2.x or 3.x and node.js 4.x, 5.x or higher, and all of them support const/let.
I don’t know if there is something that can be done to run this package on Meteor without manually transpiling it, so we’ll have to wait on another community member ideas.
Yeah, I was wondering if Meteor was transpiling imported npm modules or not. Looks like it’s not. I guess unless someone says otherwise, I can fork it, or wrap it in a Meteor package rather than use npm.
No, nor should it. As nice as this would be for us, it’s the npm package developer’s responsibility to support whatever targets he wants. It’s pretty common these days for npm packages to have a prepublish script that pipes everything through babel.
The good news is that upgrading Node is high on the priority list after 1.3 is released.
So @eterps, you’ll have to fork it and patch it to use card, then use your fork on package.json
If possible, submit a PR with a transpiration prepublish step