openimsdk/openkf

[Other]: failed to compile openkf,error: "internal/service/mail.go:54:38: string `code:` has 3 occurrences, make it a constant (goconst)"

Closed this issue · 4 comments

What would you like to share?

use the command "make all", occur an error:

===========> Building binary /root/openkf/_output/ *[Git Info]: v1.2.0.13.gf4a5a14.dirty        -f4a5a14a4ce0bdf912a4687fa09f1df20bc37943
[root@VM-90-107-tencentos openkf]# make all
===========> Verifying addlicense is installed
===========> addlicense is install in /root/openkf/_output/tools/addlicense
===========> Adding /root/openkf/scripts/template/LICENSE_TEMPLATES   the boilerplate headers for all files
2023/11/23 16:21:07 /root/openkf/kf_plugins error: lstat /root/openkf/kf_plugins: no such file or directory
===========> End the copyright is added...
===========> Validate boilerplate headers for assign files starting in the /root/openkf directory
2023/11/23 16:21:07 skipping: /root/openkf/server/test/README.md
2023/11/23 16:21:07 skipping: /root/openkf/server/test/config_test.go
2023/11/23 16:21:07 skipping: /root/openkf/server/test/integration_test.go
2023/11/23 16:21:07 skipping: /root/openkf/server/test/log_test.go
2023/11/23 16:21:07 skipping: /root/openkf/server/test/redis_mock.go
2023/11/23 16:21:07 /root/openkf/kf_plugins error: lstat /root/openkf/kf_plugins: no such file or directory
===========> End of boilerplate headers check...
===========> Verifying golangci-lint is installed
===========> golangci-lint is install in /root/openkf/_output/tools/golangci-lint
===========> Run golangci to lint source codes
WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused. 
WARN [runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner. Replaced by revive. 
WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused. 
WARN [runner] The linter 'ifshort' is deprecated (since v1.48.0) due to: The repository of the linter has been deprecated by the owner.  
WARN [runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused. 
internal/service/mail.go:54:38: string `code:` has 3 occurrences, make it a constant (goconst)
        code, err := svc.cache.Get(svc.ctx, "code:"+email)
                                            ^
make: *** [Makefile:265: lint] Error 1

use the command "npm run dev", occur an error:


> openkf@0.0.0 dev
> vite

sh: line 1: vite: command not found

can provide docker compose for deployment ?

Additional information

No response

It looks like a problem with the CI specification.

For the "make all" command, it looks like there is an error with the addlicense tool and with some of the files in the /root/openkf/kf_plugins directory. One thing you could try is to check if the addlicense tool is installed correctly and if the /root/openkf/kf_plugins directory exists. If not, you may need to reinstall the tool or create the directory.

Note

In OpenKF, the "make all" command includes numerous sub-commands. However, for the purpose of source code deployment, you can directly compile or simply use the "make build" command.

For the "npm run dev" command, it looks like there is an error with the vite tool. One thing you could try is to check if the vite tool is installed correctly and if it is added to your PATH environment variable. If not, you may need to reinstall the tool or add it to your PATH. Additionally, you could try running the command with sudo privileges or as root to see if that resolves the issue.

Regarding your question about a Docker Compose file for deployment, we do have a sample Docker Compose file available in our project repository. You can find it at https://github.com/openimsdk/openkf/tree/main/deploy. Please note that this file may need to be customized to fit your specific deployment needs.

Important

Thank you for your interest in openkf. In the early stages, we may encounter many bugs or areas where the code is not mature. We hope that you can be patient and help improve the code by submitting more PRs and issues for openkf.

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

This issue was closed because it has been stalled for 7 days with no activity.