Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用1.7.0的yapi,导入插件后报错 #2

Open
Sai-kk opened this issue May 24, 2019 · 5 comments
Open

使用1.7.0的yapi,导入插件后报错 #2

Sai-kk opened this issue May 24, 2019 · 5 comments

Comments

@Sai-kk
Copy link

Sai-kk commented May 24, 2019

你好,我的yapi的版本是1.7.0,运行命令安装导入rap的插件,然后提示重启。重启后访问yapi页面报错。报错内容为:Uncaught Error: Cannot find module "./styles/common.scss
看了一下目录架构是有这个文件的。在没安装插件前yapi是可以正常使用。请问可能是什么问题呢?

@wxxcarl
Copy link
Owner

wxxcarl commented May 24, 2019

插件里面没有用到这个样式文件./styles/common.scss,应该跟插件没有关系,空的时候我再看看

@Sai-kk
Copy link
Author

Sai-kk commented May 27, 2019

我是用docker容器安装的,容器是用githup下网友制作的,进行安装rap插件的时候提示需要先安装yapi-tool,安装好之后又提示要安装ykit,安装ykit又提示要装node-saas,容器还是,最后都装了之后,重启容器提示“TypeError: Cannot destructure property rapOrigin of 'undefined' or 'null'.”

@wxxcarl
Copy link
Owner

wxxcarl commented May 28, 2019

配置文件配了吗?

"plugins": [{
     "name": "import-rap",
     "options": {
         "rapOrigin": "http://192.168.1.100:8000" // rap项目地址
     }
 }]

@Sai-kk
Copy link
Author

Sai-kk commented May 29, 2019

这个确认是已经配置了的。后来再次安装后发现,虽然执行yapi plugin --name yapi-plugin-import-rap命令后提示插件已加载,请重启服务器。但是插件安装的时候有报错,说很多模块不存在,如node-sass等,安装node-sass的时候又提示了其他的模块缺失。不知道是不是因为yapi的GitHub主页面下面提供的docker镜像是极简镜像的原因。请问您知道这个插件需要依赖其他什么的吗?

@danaeliu
Copy link

这个问题有结果吗?安装了node-sass插件也仍然报错,common.sass文件也存在。感觉语法用import无法加载模块

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants