javascript - 如何询问 Meteor 为旧的 Nodejs 构建代码

标签 javascript node.js meteor

Meteor 构建的 Wekan 代码无法在 Node 0.10.4x 中运行, Meteor 将为新版本 Node 创建代码,例如 const 或 lambda 表达式。 如何让 Meteor 构建可以在 Node 0.10.4x 中运行的代码?

错误1:

/home/wekan/output/bundle/programs/server/packages/modules.js:33433
const Boom = require(‘boom’);
^^^^^
SyntaxError: Use of const in strict mode.
at /home/wekan/output/bundle/programs/server/boot.js:292:30
at Array.forEach (native)
at Function..each..forEach (/home/wekan/output/bundle/programs/server/node_modules/underscore/underscore.js:79:11)
at /home/wekan/output/bundle/programs/server/boot.js:133:

错误2:

/home/wekan/output/bundle/programs/server/packages/modules.js:33571
credentialsFunc(attributes.id, (err, credentials) => {
^Preformatted text
SyntaxError: Unexpected token >
at /home/wekan/output/bundle/programs/server/boot.js:292:30
at Array.forEach (native)
at Function..each..forEach (/home/wekan/output/bundle/programs/server/node_modules/underscore/underscore.js:79:11)
at /home/wekan/output/bundle/programs/server/boot.js:133:5

最佳答案

根据 Wekan 文档 https://github.com/wekan/wekan/wiki/Install-and-Update

If you haven't already, you need to install Node.js, given that we need node version 4.8.4, make sure to either use the custom packages (the ones of your OS are likely too old) or install the correct version from the Node.js website.

Node 0.10.4 已经很老了,我不知道为什么你还在使用它。如果你想在你的机器上管理不同版本的 Node ,你可以使用像 nvm 这样的东西。

关于javascript - 如何询问 Meteor 为旧的 Nodejs 构建代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46590500/

相关文章:

javascript - 通过php制作xml时如何处理融合图表中的特殊字符

javascript - React 应用程序加载主页而不是所需页面

javascript - 无法监视现有功能

Node.js 静态 Assets 代理

node.js - 错误: connect ECONNREFUSED in Ionic

meteor - 获取段错误 : 11ation error when starting Meteor server

javascript - 从 ember 组件引用全局库

javascript - VueJS v-for 循环在引用其他 ID 时中断

android - 将用户数据从 Meteor 导出到 .CSV 文件

android - 由于缺少构建 APK 后的 meteor 1.2