linux - 用 meteor 执行 unix 命令

标签 linux meteor command execute

我是 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/

相关文章:

php - 调用 shell 命令的脚本在 CLI 中工作,而不是在 Web 上下文中工作

windows - RSS 在我的开发服务器上工作正常,而不是在我的现场服务器上

linux - sonarqube卸载linux

javascript - 我可以在 meteor 中添加/更改其他用户的密码吗?

java - Android WebView 显示空白屏幕

android - 如何从android上的shell命令获取唤醒锁

linux - Linux 下Ada list 运行进程

linux - 在 Windows 上运行虚拟机

javascript - 防止在 meteor 中单击表单按钮时重新加载页面?

linux - watch 命令的意外行为