Hi guys,
I am trying to use npm package ‘mollie-es6’ in Meteor but I am getting this error:
Error 1:
WebstormProjects/untitled6/.meteor/local/build/programs/server/packages/modules.js:987
const {assign} = require('lodash');
^
SyntaxError: Unexpected token {
at Object.exports.runInThisContext (vm.js:53:16)
at WebstormProjects/untitled6/.meteor/local/build/programs/server/boot.js:287:30
at Array.forEach (native)
at Function._.each._.forEach (.meteor/packages/meteor-tool/.1.4.1_2.1z11dsj++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
at /WebstormProjects/untitled6/.meteor/local/build/programs/server/boot.js:128:5
Exited with code: 1
Your application is crashing. Waiting for file change.
Error 2:
/WebstormProjects/untitled6/.meteor/local/build/programs/server/packages/modules.js:1102
for (let i = 0; i < payments.length; i++) {
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at Object.exports.runInThisContext (vm.js:53:16)
at /WebstormProjects/untitled6/.meteor/local/build/programs/server/boot.js:287:30
at Array.forEach (native)
at Function._.each._.forEach /.meteor/packages/meteor-tool/.1.4.1_2.1z11dsj++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
at/WebstormProjects/untitled6/.meteor/local/build/programs/server/boot.js:128:5
Exited with code: 1
Your application is crashing. Waiting for file change.
Can anybody explain why this is errors are showing up in Meteor?
Using it directly in NodeJS it’s working perfectly.