Firstsawyou opened a new issue #1485:
URL: https://github.com/apache/apisix-dashboard/issues/1485
# Bug report
## Describe the bug
When the `api/build-tools/schema-sync.sh $version` command is executed under
the `apisix-dashboard` directory, it will report:
```
lua: ./apisix/core/table.lua:21: module 'table.new' not found:
no field package.preload['table.new']
no file './table/new.lua'
```
## How to Reproduce
1. Execute the `api/build-tools/schema-sync.sh 2.3` command
```
$ api/build-tools/schema-sync.sh 2.3
```
2. See error
```
$ api/build-tools/schema-sync.sh 2.3
++ pwd
+ pwd=/usr/local/apisix-dashboard
+ [[ -n 2.3 ]]
+ [[ -d 2.3 ]]
......
+ rm -rf ./apisix-2.3
+ cd ./api/build-tools/
+ lua schema-sync.lua
lua: ./apisix/core/table.lua:21: module 'table.new' not found:
no field package.preload['table.new']
no file './table/new.lua'
no file '/usr/share/lua/5.1/table/new.lua'
no file '/usr/share/lua/5.1/table/new/init.lua'
no file '/usr/lib64/lua/5.1/table/new.lua'
no file '/usr/lib64/lua/5.1/table/new/init.lua'
no file './table/new.so'
no file '/usr/lib64/lua/5.1/table/new.so'
no file '/usr/lib64/lua/5.1/loadall.so'
no file './table.so'
no file '/usr/lib64/lua/5.1/table.so'
no file '/usr/lib64/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
./apisix/core/table.lua:21: in main chunk
[C]: in function 'require'
./apisix/core/config_util.lua:17: in main chunk
[C]: in function 'require'
./apisix/plugins/grpc-transcode/proto.lua:18: in main chunk
[C]: in function 'require'
./apisix/plugins/grpc-transcode.lua:20: in main chunk
[C]: in function 'require'
schema-sync.lua:149: in main chunk
[C]: ?
+ rm -rf ./api/build-tools/apisix/
......
```
## Expected behavior
When executing the `api/build-tools/schema-sync.sh` script, the following
information should not be reported:
```
lua: ./apisix/core/table.lua:21: module 'table.new' not found:
no field package.preload['table.new']
no file './table/new.lua'
no file '/usr/share/lua/5.1/table/new.lua'
no file '/usr/share/lua/5.1/table/new/init.lua'
no file '/usr/lib64/lua/5.1/table/new.lua'
no file '/usr/lib64/lua/5.1/table/new/init.lua'
no file './table/new.so'
no file '/usr/lib64/lua/5.1/table/new.so'
```
## System information
- OS: [e.g. macOS, Windows]: linux
- Browser (if applies) [e.g. Chrome, Safari, Edge]
- Version: [e.g. 2.0-rc3]: 2.4
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]