我正在尝试在我的meteor项目中使用一个apollp堆栈。我用过
meteor add apollo
meteor npm install --save apollo-client apollo-server express 来安装apollo堆栈,但是当我执行meteor来运行我的项目时,它给出错误
/home/xxxxxx/Example/crud/.meteor/local/build/programs/server/packages/modules.js:97872
const graphql_1 = require('graphql');
^^^^^
SyntaxError: Use of const in strict mode.
at/home/xxxxxx/Example/crud/.meteor/local/build/programs/server/boot.js:292:30
at Array.forEach (native)
at Function._.each._.forEach (/home/xxxxxxx/.meteor/packages/meteor-tool/.1.3.4_1.1wjluqr++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)你知道这里发生了什么吗??
发布于 2016-08-09 06:34:02
我也在尝试做同样的事情。我想我可以把你带到下一步。只需在您的npm安装中添加几项内容:
meteor npm install --save apollo-client apollo-server@^0.1.1 express graphql
我已经在文档中添加了一个PR来将graphql添加到npm安装中。此外,apollo- @^0.1.1最近更新到了0.2,但是meteor-integration是still working on it -当这个问题得到解决时,将不再需要apollo。我仍然有一些问题,所以这可能不会让你完全做到这一点,但它为我解决了这个错误。
https://stackoverflow.com/questions/38827075
复制相似问题