bttmly / nba

Node.js client for nba.com API endpoints
MIT License
708 stars 173 forks source link

Vue yarn build error #53

Closed jacobwise closed 6 years ago

jacobwise commented 6 years ago

ERROR in static/js/vendor.15653ba71d70b10565f1.js from UglifyJs Name expected [./node_modules/nba/src/sport-vu.js:1,0][static/js/vendor.15653ba71d70b10565f1.js:6,6]

running yarn build, here is my .bablerc file

{ "presets": [ [ "env", { "modules": false, "targets": { "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] } } ], "stage-2", "es2015" ], "plugins": ["transform-runtime"], "env": { "test": { "presets": ["env", "es2015", "stage-2"], "plugins": ["istanbul"] } } }

bttmly commented 6 years ago

Haven't seen this kind of problem before but looks related to this I guess

can you show the application code where you're importing and using this library?

You could try using the compiled nba/dist/nba file which should be ES5 compatible.

jacobwise commented 6 years ago

Thank you, changing to the compiled version fixed it.