Sublime Text編譯CoffeeScript出錯解決方案

來源:互聯網
上載者:User

標籤:解決方案   編譯   coffee   安裝   出錯   

今天嘗試用Sublime Text編譯CoffeeScript
先安裝了CoffeeScript的外掛程式, 然後編譯器中多了一項CoffeeScript, 但是嘗試編譯卻提示出錯, 然後上網尋找解決方案無解…於是就自己嘗試去改了下SublimeText的build命令, 結果成功了

出錯資訊如下:
/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:111    throw new Error("Cakefile not found in " + (process.cwd()));          ^Error: Cakefile not found in /home/bill/Desktop  at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:111:11)  at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:109:14)  at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:109:14)  at cakefileDirectory (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:109:14)  at Object.exports.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/cake.js:51:19)  at Object.<anonymous> (/usr/local/lib/node_modules/coffee-script/bin/cake:7:38)  at Module._compile (module.js:456:26)  at Object.Module._extensions..js (module.js:474:10)  at Module.load (module.js:356:32)  at Function.Module._load (module.js:312:12)  at Function.Module.runMain (module.js:497:10)  at startup (node.js:119:16)  at node.js:929:3[Finished in 0.1s with exit code 8]
解決方案:

開啟CoffeeScript外掛程式的位置(我的是”/usr/share/sublime-text/Data/Packages/CoffeeScript”)中的CoffeeScript.sublime-build檔案, 將內容修改為{ "cmd": ["coffee", "$file"], "selector": "source.coffee" }
然後就可以用Sublime Text編譯Coffee檔案了

Sublime Text編譯CoffeeScript出錯解決方案

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.