0
CoffeScript 용으로 tutorial을 따르려고합니다.CoffeeScript 파일을 어떻게 요구합니까?
내가 터미널을 열고 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: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
을 시도했다.
NodeJS 문서를 보았습니까? http : //nodejs.org/api/modules.html – elclanrs
물론 NODE.js에서 사용하기 전에 js로 커피를 컴파일해야합니다 .-) – andi
try 'node' 대신'coffee' repl을 시작하십시오. – Bergi