Error: use CoffeeScript.register () or require the script / register coffee module to require .iced.md files

my app.js

:

require("iced-coffee-script");
require("./serverOneNode.iced");

      

when i run it:

node app.js

      

received error:

/projectPath/node_modules/iced-coffee-script/lib/coffee-script/coffee-script.js:200
          throw new Error("Use CoffeeScript.register() or require the coffee-s
                ^
Error: Use CoffeeScript.register() or require the coffee-script/register module to require .iced.md files.
  at Object._base.(anonymous function) [as .iced] (/projectPath/node_modules/iced-coffee-script/lib/coffee-script/coffee-script.js:200:17)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/projectPath/app.js:2:1)
  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:902:3

      

This happened after updating iced-coffee-script

and coffee-script

.

+3


source to share


1 answer


I added a line require('iced-coffee-script/register');

to the file app.js

before asking serverOneNode.iced

and the issue was successfully resolved.



+1


source







All Articles