Nodejs:SyntaxError 异常 - "Unexpected token new" 在尝试要求 ajv.js 时遇到

Nodejs: SyntaxError Exception - "Unexpected token new" faced while trying to require ajv.js

尝试要求 Ajv 模块时出现异常。

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

异常发生在 vm.js 的

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)

有任何纠正此问题的建议吗?

这听起来可能真的很有趣,但我必须卸载并重新安装 ajv.js 才能正常工作。

关于可能发生的事情的任何线索?