首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在快速网关中找不到模块users.json错误

在快速网关中找不到模块users.json错误
EN

Stack Overflow用户
提问于 2019-04-03 13:53:13
回答 1查看 422关注 0票数 0

快速网关安装完成后,使用以下命令创建API网关时:

代码语言:javascript
复制
eg gateway create

我得到了下面的错误。

代码语言:javascript
复制
[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文件夹并重新安装它,但问题仍然存在。

EN

回答 1

Stack Overflow用户

发布于 2019-05-05 03:15:38

当脚手架/创建部分出现错误时,通常会发生这种情况。我还可以看到您正在从Windows运行该命令。

我们有不同的用户抱怨该操作系统的一些奇怪的CLI问题,我现在并不积极支持这些问题。

从存储库中复制该文件并将其放入正确目录应该不会太难。我知道这是一种变通办法,但它应该能起到作用。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55487946

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档