module.js:538 throw err;使用角4

时间:2017-12-17 02:32:53

标签: node.js angular npm angular-cli

我在我的角度4项目“module.js:538 throw err;”中遇到了这种错误。有谁知道这是什么一回事?

module.js:538
throw err;
^

Error: Cannot find module 'swagger-js-codegen'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\zack\Desktop\my projects\accounting-
    project\swagger\generate.js:7:15)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1

1 个答案:

答案 0 :(得分:6)

只需安装 missing module

即可
npm install swagger-js-codegen --save