Issue with Dependency Version Compatibility in @my-project/plugin-hello
Build Process
Description:
I’m currently developing a plugin called @my-project/plugin-hello
via instruction on official web page and encountered issues with dependency version compatibility during the build process. My project is structured as follows:
package.json
:
{
"name": "@my-project/plugin-hello",
"version": "0.1.0",
"main": "dist/server/index.js",
"dependencies": {},
"peerDependencies": {
"@nocobase/client": "1.x",
"@nocobase/server": "1.x",
"@nocobase/test": "1.x"
}
}
Build Command and Output: I used the following command to build my plugin:
yarn build @my-project/plugin-hello --tar
The output indicates successful packaging, but there are specific warnings about dependency management:
@my-project/plugin-hello: build plugin client
The build tool will package all dependencies into the dist directory, so you don't need to put them in @nocobase/client, @nocobase/server, @nocobase/database. Instead, they should be placed in dependencies.
...
These packages node-fetch will be bundled to dist/node_modules. These packages @nocobase/server, @nocobase/database will be exclude.
...
Dependency Compatibility Check Results: Despite a successful build, there are issues with the version compatibility of some dependencies:
@nocobase/client
and@nocobase/database
versions do not match the required range (1.2.x
).
Request for Assistance:
- How should I manage dependencies correctly to avoid version mismatch issues?
- Are there specific configurations or practices recommended for handling such dependencies in
NocoBase
plugins for creating basic plugin?
Any guidance or advice on resolving these dependency version compatibility issues would be greatly appreciated.