Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meteor 1.3 NPM: Unexpected reserved word import

I'm trying to follow the guide here:

https://guide.meteor.com/using-packages.html

Installing a few node packages then trying to import them into my methods.js file but Im getting the following error:

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?

like image 581
nilsi Avatar asked Apr 23 '16 06:04

nilsi


1 Answers

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.

like image 137
Kishor Avatar answered Nov 12 '22 10:11

Kishor