nilsi nilsi - 8 months ago 175
Node.js Question

Meteor 1.3 NPM: Unexpected reserved word import

When I follow the guide here:

Installing a few node packages then trying to import them into my

file Im getting the following:

W20160423-15:08:57.338(9)? (STDERR) app/server/methods.js:1
W20160423-15:08:57.338(9)? (STDERR) (function(Npm,Assets){(function(){import Fibers from 'fibers';
W20160423-15:08:57.338(9)? (STDERR) ^^^^^^
W20160423-15:08:57.343(9)? (STDERR) SyntaxError: Unexpected reserved word
W20160423-15:08:57.344(9)? (STDERR) at /repos/myproject/.meteor/local/build/programs/server/boot.js:278:30
W20160423-15:08:57.344(9)? (STDERR) at Array.forEach (native)
W20160423-15:08:57.344(9)? (STDERR) at Function._.each._.forEach (/Volumes/320gb/macbookpro/.meteor/packages/meteor-tool/.1.3.2_4.1rz3z4t++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20160423-15:08:57.345(9)? (STDERR) at /repos/myproject/.meteor/local/build/programs/server/boot.js:133:5

My packages seems to be installed correctly. Not sure what's causing this, Is this a bug?


This error occurs if you don't add ecmascript packages. I think (not sure), this is added by default for newer projects but needs to be added explicitly when updating from previous versions of meteor. Try adding this package using,

meteor add ecmascript

Last time, I also faced similar problem, I came to know about it from this link.