flipped-aurora/gin-vue-admin · error
非标准插件,请按照文档自动迁移使用
Error message
非标准插件,请按照文档自动迁移使用
What it means
Install scans the uploaded plugin archive for a directory ending at 'server/plugin' and 'web/plugin' paths. If neither is found, the archive layout does not match the required plugin structure (server/plugin/<name> and/or web/plugin/<name> at those depths), so it logs and returns this error telling the author to repackage per the plugin documentation.
Source
Thrown at server/service/system/auto_code_plugin.go:116
}
if pathArr[2]+"/"+pathArr[3] == `server/plugin` {
if len(serverPlugin) == 0 {
serverPlugin = filepath.Join(pathArr[0], pathArr[1], pathArr[2], pathArr[3])
}
if serverRootName == "" && ln > 1 && pathArr[1] != "" {
serverRootName = pathArr[1]
}
if ln > 4 && serverPackage == "" && pathArr[4] != "" {
serverPackage = pathArr[4]
}
}
if pathArr[2]+"/"+pathArr[3] == `web/plugin` && len(webPlugin) == 0 {
webPlugin = filepath.Join(pathArr[0], pathArr[1], pathArr[2], pathArr[3])
}
}
if len(serverPlugin) == 0 && len(webPlugin) == 0 {
zap.L().Error("非标准插件,请按照文档自动迁移使用")
return webIndex, serverIndex, errors.New("非标准插件,请按照文档自动迁移使用")
}
if len(serverPlugin) != 0 {
if serverPackage == "" {
serverPackage = serverRootName
}
err = installation(serverPlugin, global.GVA_CONFIG.AutoCode.Server, global.GVA_CONFIG.AutoCode.Server)
if err != nil {
return webIndex, serverIndex, err
}
err = ensurePluginRegisterImport(serverPackage)
if err != nil {
return webIndex, serverIndex, err
}
}
if len(webPlugin) != 0 {
err = installation(webPlugin, global.GVA_CONFIG.AutoCode.Server, global.GVA_CONFIG.AutoCode.Web)View on GitHub (pinned to 3136500ef3)
Solutions
- Repackage the zip so it contains server/plugin/<name>/ and web/plugin/<name>/ at the correct relative depths — zip from the parent of 'server'/'web'.
- Verify the archive by listing it: unzip -l plugin.zip should show paths ending in server/plugin/<name>/ and web/plugin/<name>/.
- If the plugin is intentionally non-standard, install it manually by copying folders into server/plugin/ and web/src/plugin/ instead of using auto-install.
- Follow aiDoc/modules/plugin-development.md directory conventions when building the plugin.
Example fix
// before (zip root contains plugin files directly) myplugin/main.go myplugin/api/... // after (standard layout, zip from parent dir) server/plugin/myplugin/main.go web/src/plugin/myplugin/index.js
Defensive patterns
Strategy: validation
Validate before calling
const entries = await listZipPaths(zipFile)
const hasServer = entries.some(p => /(^|\/)server\/plugin\/[^/]+\//.test(p))
const hasWeb = entries.some(p => /(^|\/)web\/plugin\/[^/]+\//.test(p))
if (!hasServer && !hasWeb) {
throw new Error('非标准插件,请按照文档自动迁移使用')
} Try / catch
webIndex, serverIndex, err := pluginService.Install(file)
if err != nil && strings.Contains(err.Error(), "非标准插件") {
return fmt.Errorf("插件包缺少 server/plugin 或 web/plugin 目录结构,请重新打包: %w", err)
} Prevention
- Always zip from the directory containing 'server/' and 'web/', not from inside them.
- Validate the zip listing against the documented layout before upload.
- Use the official plugin template (aiDoc/modules/plugin-development.md) so structure is guaranteed.
When it happens
Trigger: Uploading a plugin zip whose inner folders are not exactly .../server/plugin and .../web/plugin at the expected path depth (arr[1]/arr[2]/arr[2]/arr[3] style), e.g. zip created from the wrong root directory, extra wrapper folder, or a backend-only plugin archived with a nested 'myplugin/server/plugin' prefix of wrong length.
Common situations: Compressing the plugin folder itself instead of its contents; renamed top-level directories; plugins built against older layout conventions; manually restructured zips.
Related errors
AI-assisted analysis of flipped-aurora/gin-vue-admin@3136500ef3 (2026-08-31).
Data as JSON: /api/errors/5463674c0fd4d00f.
Report an issue: GitHub.