首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在本地运行的Swagger编辑器显示空页面

在本地运行的Swagger编辑器显示空页面
EN

Stack Overflow用户
提问于 2015-01-13 16:34:27
回答 2查看 2.4K关注 0票数 1

我是个大摇大摆的新手。

我已经在django-rest-framework中创建了API。我想把它们记录下来。因此阅读有关swagger的文章。

我尝试了django-rest-swagger,但由于缺乏文档,我无法使我的代码适合于文档。因此,我正在尝试swagger编辑器,它将允许我从头开始设计API结构。我已经在本地安装了它,但它在"127.0.0.1:9000“处显示了空页。我现在该怎么做?

我想写的YAML或JSON文件,将消费的swagger编辑器安装在本地。我如何才能做到这一点?

这是我加载127.0.0.1:9000时控制台上的错误

代码语言:javascript
复制
Warn: could not find module util
http://127.0.0.1:9000/bower_components/angular-schema-form/dist/schema-form.js Failed to load resource: the server responded with a status of 404 (Not Found)
angular.js:80 Uncaught Error: [$injector:nomod] Module 'schemaForm' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.3.2/$injector/nomod?p0=schemaForm
angular.js:80 Uncaught Error: [$injector:modulerr] Failed to instantiate module PhonicsApp due to:
Error: [$injector:modulerr] Failed to instantiate module schemaForm due to:
Error: [$injector:nomod] Module 'schemaForm' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
EN

回答 2

Stack Overflow用户

发布于 2015-02-26 01:00:36

我不太确定这里的问题是什么。一般来说,您可以随时清理npm和Bower模块,并重新从清理状态开始。

代码语言:javascript
复制
npm cache clean
rm -rf node_modules
npm install
bower cache clean 
rm -rf app/bower_components
bower install
npm start
票数 0
EN

Stack Overflow用户

发布于 2016-05-13 16:25:45

我也有同样的问题。

以前我的节点版本是最新的v6

我重新安装了所有内容,然后安装了v4.4.4

代码语言:javascript
复制
node --v

确保是v4.4.4

代码语言:javascript
复制
npm install -g http-server

wget https://github.com/swagger-api/swagger-editor/releases/download/v2.10.1/swagger-editor.zip

unzip swagger-editor.zip

http-server

不要使用http-server swagger-editor

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

https://stackoverflow.com/questions/27917837

复制
相关文章

相似问题

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