我正在关注Trigger.io Forge tutorials,我无法在OSX 10.8上的命令行中正常工作。
使用终端和Forge教程,我转到forge-workspace文件夹并在终端输入:
$HOME/Library/Trigger\ Toolkit/forge create
然后回来:
Matts-MacBook-Pro:forge-workspace mattm$ $HOME/Library/Trigger\ Toolkit/forge create
[ INFO] Forge tools running at version 3.3.17
[ INFO] Update result: you already have the latest tools
This name is what your application will be called on devices. You can change it later through config.json.
App Name: Weather App
[ INFO] Registering new app "Weather App" with trigger.io...
[ INFO] Fetching initial project template
[ INFO] Building app for the first time...
[ INFO] Update result: you already have the latest tools
[ INFO] App structure created. To proceed:
[ INFO] 1) Put your code in the "src" folder
[ INFO] 2) Run forge build to make a build
[ INFO] 3) Run forge run to test out your build
Matts-MacBook-Pro:forge-workspace mattm$
教程说:
此时,您应该打开一个类似于:
的命令终端(forge-environment)
但这并没有显现出来。另外,当我查看我的库目录(并进行全系统搜索)时,我看不到任何标记为Trigger的文件夹。
当我尝试按照教程指示操作并使用forge create命令时,没有任何反应:
Matts-MacBook-Pro:hello-world mattm$ forge create</p>
-bash: forge: command not found
Matts-MacBook-Pro:hello-world mattm$ $forge create</p>
-bash: create: command not found
在你问之前,是的,我安装了Python,并且能够使用Forge浏览器界面构建和运行应用程序。
知道我错过了什么吗?
答案 0 :(得分:10)
在Mac OS X上,将以下内容添加到bash配置文件
export PATH=$PATH:/Applications/TriggerToolkit.app/Contents/MacOS/
答案 1 :(得分:2)
我已推送对“入门”文档的更新以澄清这一点: http://docs.trigger.io/en/v1.4/getting-started.html#getting-started-with-the-command-line-tools
不再需要注意“(伪造环境)”。如果将forge可执行文件的路径添加到PATH,那么您将能够按照您的尝试运行命令。