我是 meteor 的新手。 有人会帮助我吗?如何使用 meteor 运行 Linux 命令?我在另一篇文章中看到过,我建议使用:
sys = __meteor_bootstrap__.require('sys');
但我得到了错误,似乎 meteor bootstrap 不需要功能。
最佳答案
基本上来说,您不能简单地从 Meteor 应用程序require
节点模块。解决此问题的最简单方法是使用 meteor:npm
智能包:
meteor add meteorhacks:npm
请阅读文档 here .此外,您可能不需要 sys
模块。尝试使用 child_process
:
https://nodejs.org/api/child_process.html
这是运行外部命令的节点标准。
关于linux - 用 meteor 执行 unix 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32024734/