错误:找不到模块'../util/validator'

时间:2017-10-09 19:38:43

标签: node.js typescript npm

我无法导入TextValidator文件中的本地类validator.ts。我收到以下错误

node_modules/.bin/mocha --require babel-register  shared/test/validator.ts 
module.js:491
    throw err;
    ^

Error: Cannot find module '../util/answer-validator'
    at Function.Module._resolveFilename (module.js:489:15)
    at Function.Module._load (module.js:439:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (shared/test/answer-validator.ts:1:1)
    at Module._compile (module.js:573:30)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Array.forEach (<anonymous>)
    at Mocha.run
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Function.Module.runMain (module.js:609:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:598:3

0 个答案:

没有答案