nil*_*lsi 9 node.js cordova meteor
我正试着按照这里的指南:
https://guide.meteor.com/using-packages.html
安装几个节点包,然后尝试将它们导入我的methods.js文件,但我收到以下错误:
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
Run Code Online (Sandbox Code Playgroud)
我的包似乎安装正确.不确定是什么导致了这个,这是一个错误吗?
Kis*_*hor 17
如果您不添加ecmascript包,则会发生此错误.我认为(不确定),这是默认添加到较新的项目,但需要在从以前版本的meteor更新时明确添加.尝试添加此包,使用,
meteor add ecmascript
Run Code Online (Sandbox Code Playgroud)
上次,我也面临类似的问题,我从这个链接开始了解它.