I tried to compile and install the ready-made plugin myself. I used hints from an external AI agent. First, I tried to build it on the installed version NocoBase on my server (installation - using EasyPanel, via Docker images), but nothing worked, I kept getting an error in the console
root@8e9c6325f86e:/app/nocobase# yarn build @nocobase/plugin-block-tabs --no-dts
yarn run v1.22.22
$ nocobase build @nocobase/plugin-block-tabs --no-dts
Please install all dependencies
$ yarn install
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
root@8e9c6325f86e:/app/nocobase#
Something similar was mentioned in the thread Plugin dependencies check failed on official example, but no solution was found.
As I understand it, the image installs a “production” version of the platform on the server, and it is not possible to build anything on it.
For the build, I installed the “dev version” of Nocobase from GitHub on my local PC specifically to build plugins there.
I downloaded the plugin from GitHub, installed all the dependencies, ran the “yarn build”, and everything went well (see the console output below).
PS E:\Business\Projects\nocobase-2\nocobase> yarn build @nocobase/plugin-block-tabs --no-dts
yarn run v1.22.19
$ nocobase build @nocobase/plugin-block-tabs --no-dts
$ tsup
@nocobase/plugin-block-tabs: plugins/@nocobase/plugin-block-tabs build start
@nocobase/plugin-block-tabs: build plugin client
asset index.js 17.8 KiB [emitted] (name: main)
orphan modules 34 KiB [orphan] 9 modules
runtime modules 971 bytes 4 modules
cacheable modules 35.8 KiB
modules by path external "@formily/ 84 bytes
external "@formily/react" 42 bytes [built] [code generated]
external "@formily/shared" 42 bytes [built] [code generated]
./src/client/index.tsx + 8 modules 34 KiB [code generated]
external "@nocobase/client" 42 bytes [built] [code generated]
external "@emotion/css" 42 bytes [built] [code generated]
external "antd" 42 bytes [built] [code generated]
../../../../node_modules/classnames/index.js 1.49 KiB [built] [code generated]
external "react" 42 bytes [built] [code generated]
external "react-i18next" 42 bytes [built] [code generated]
Rspack 1.3.2 compiled successfully in 3.81 s
@nocobase/plugin-block-tabs: build plugin server source
@nocobase/plugin-block-tabs: delete server files
@nocobase/plugin-block-tabs: build plugin server dependencies
@nocobase/plugin-block-tabs: These packages @nocobase/server will be exclude. For more information, please refer to: https://docs.nocobase.com/development/others/deps.
@nocobase/plugin-block-tabs: write external version
Done in 39.28s.
PS E:\Business\Projects\nocobase-2\nocobase>
Then packed the assembled plugin into an archive
PS E:\Business\Projects\nocobase-2\nocobase\packages\plugins\@nocobase\plugin-block-tabs> yarn pack
yarn pack v1.22.19
success Wrote tarball to "E:\\Business\\Projects\\nocobase-2\\nocobase\\packages\\plugins\\@nocobase\\plugin-block-tabs\\nocobase-plugin-block-tabs-v1.0.0.tgz".
Done in 0.15s.
PS E:\Business\Projects\nocobase-2\nocobase\packages\plugins\@nocobase\plugin-block-tabs>
I uploaded the finished archive via the plugin manager UI. But it showed a similar error during installation…
What could be wrong, and is there a solution? Maybe I’m doing something wrong?