Javascript 我如何需要CoffeeScript文件?
我正试图为CoffeScript遵循这一点 我打开终端,导航到simpleMath.coffee所在的目录,运行node并尝试var simpleMath=require'./simpleMath';,这将导致以下错误:Javascript 我如何需要CoffeeScript文件?,javascript,node.js,coffeescript,Javascript,Node.js,Coffeescript,我正试图为CoffeScript遵循这一点 我打开终端,导航到simpleMath.coffee所在的目录,运行node并尝试var simpleMath=require'./simpleMath';,这将导致以下错误: Error: Cannot find module 'simpleMath' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:2
Error: Cannot find module 'simpleMath'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at repl:1:18
at REPLServer.self.eval (repl.js:110:21)
at repl.js:249:20
at REPLServer.self.eval (repl.js:122:7)
at Interface.<anonymous> (repl.js:239:12)
at Interface.EventEmitter.emit (events.js:95:17)
我也尝试了simpleMath,但没有。/。您需要先将咖啡编译成js。查看它在GUI中捕获并编译您的文件,并在失败时发送通知。非常好。你看过NodeJS文档了吗?当然,在NODE.js中使用之前,你需要将咖啡编译成js-尝试启动coffee repl,而不是任何可能重复的