安装 express-gateway 后,当我使用以下命令创建 API 网关时,
eg gateway create
我收到以下错误。
[EG:config] error: Cannot find module 'C:\My Content\Microservice Projects\FIFA Team Selection\config\models\users.json'
C:\My Content\Microservice Projects\FIFA Team Selection\node_modules\express-gateway\lib\config\index.js:15
throw err;
^
Error: Cannot find module 'C:\My Content\Microservice Projects\FIFA Team Selection\config\models\users.json'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at forEach.model (C:\My Content\Microservice Projects\FIFA Team Selection\node_modules\express-gateway\lib\config\config.js:68:27)
at Array.forEach (<anonymous>)
at Config.loadModels (C:\My Content\Microservice Projects\FIFA Team Selection\node_modules\express-gateway\lib\config\config.js:65:61)
at Object.<anonymous> (C:\My Content\Microservice Projects\FIFA Team Selection\node_modules\express-gateway\lib\config\index.js:11:10)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
child_process.js:624
throw err;
^
Error: Command failed: C:\My Content\Microservice Projects\FIFA Team Selection\node_modules\.bin\eg.cmd gateway create
at checkExecSyncError (child_process.js:601:13)
at execFileSync (child_process.js:621:13)
at exports.executeInScope.env (C:\Users\bmaheshwari\AppData\Roaming\npm\node_modules\express-gateway\bin\execution-scope.js:37:5)
at Object.exports.bootstrap (C:\Users\bmaheshwari\AppData\Roaming\npm\node_modules\express-gateway\bin\environment.js:11:7)
at Object.<anonymous> (C:\Users\bmaheshwari\AppData\Roaming\npm\node_modules\express-gateway\bin\index.js:9:46)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
我尝试删除 node_modules 文件夹并重新安装它,但问题仍然存在。