大张旗鼓的项目编辑显示未找到项目根目录

时间:2018-06-29 06:43:57

标签: swagger swagger-ui swagger-editor

我正在尝试打开swagger项目编辑器,但面临此问题。我搜索了github仓库,但没有发现它们真的有帮助。

npm install -g swagger将软件包正确安装在文件夹中。

我还全局安装了npm,它的实际路径是/usr/lib/local/node_module。这是冲突吗?

Error: Project root not found in or above: /home/divyashree/IdeaProjects/weather-api
    at findProjectFile (/usr/local/lib/node_modules/swagger/lib/commands/project/project.js:312:6)
    at readProject (/usr/local/lib/node_modules/swagger/lib/commands/project/project.js:268:3)
    at Command.edit (/usr/local/lib/node_modules/swagger/lib/commands/project/project.js:240:3)
    at Command.<anonymous> (/usr/local/lib/node_modules/swagger/lib/util/cli.js:167:27)
    at Command.listener (/usr/local/lib/node_modules/swagger/node_modules/commander/index.js:315:8)
    at emitTwo (events.js:126:13)
    at Command.emit (events.js:214:7)
    at Command.parseArgs (/usr/local/lib/node_modules/swagger/node_modules/commander/index.js:651:12)
    at Command.parse (/usr/local/lib/node_modules/swagger/node_modules/commander/index.js:474:21)
    at Object.<anonymous> (/usr/local/lib/node_modules/swagger/bin/swagger-project.js:80:5)

屏幕截图为enter image description here

0 个答案:

没有答案