0

Exception occurred while trying to require Ajv module.

var Ajv = require('C:/../node_modules/ajv/lib/ajv.js')

Exception occurred in vm.js at

function createScript(code, options) {
    return new Script(code, options);
}

Exception has occurred: SyntaxError
SyntaxError: Unexpected token new
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:533:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\myFile.js:1:73)

Any suggestions to correct this?

Ulysses
  • 5,616
  • 7
  • 48
  • 84

1 Answers1

0

It might sound really funny but I had to uninstall and install back ajv.js to get this working.

Any clues about what could have happened?

Ulysses
  • 5,616
  • 7
  • 48
  • 84