【发布时间】:2013-01-03 01:54:40
【问题描述】:
我正在使用来自 this question 的 typescript 构建以及 sublime text 2 中的 build-on-save 插件来尝试自动编译 typescript:
{
"cmd": ["tsc","$file"],
"file_regex": "(.*\\.ts?)\\s\\(([0-9]+)\\,([0-9]+)\\)\\:\\s(...*?)$",
"selector": "source.ts",
"osx": {
"path": "/usr/local/bin:/opt/local/bin"
}
}
由于以下错误,它永远不会构建。任何提示?
[Errno 2] No such file or directory
[cmd: [u'tsc', u'/Users/dbrito/Sites/Prototypes/totem-tracker/client/views/layout.ts']]
[dir: /Users/dbrito/Sites/Prototypes/totem-tracker/client/views]
[path: /usr/local/bin:/opt/local/bin]
[Finished]
注意:node 和 npm 是使用 homebrew 安装的。 Typescript 是使用npm -g install typescript 安装的。我在 10.8.2 上安装了最新的 xcode 和命令行工具。以下是我的.profile:
export PATH="/usr/local/bin:/usr/local/sbin:~/node_modules/.bin:/usr/local/share/npm/bin:/usr/local/Library/Aliases:${PATH}"
export NODE_PATH="/usr/local/lib/node_modules:${NODE_PATH}"
【问题讨论】: