Skip to content

Module federation warnings "No required version specified" #92

@andreasgerstmayr

Description

@andreasgerstmayr

There are a lot of warnings in the build:

File: /home/runner/work/plugins/plugins/node_modules/@perses-dev/components/dist/Legend/Legend.js:1:1
  ⚠ No required version specified and unable to automatically determine one. Unable to find required version for "immer" in description file/s
  │ /home/runner/work/plugins/plugins/package.json
  │ /home/runner/work/plugins/plugins/node_modules/@perses-dev/components/package.json
  │ It need to be in dependencies, devDependencies or peerDependencies. file: shared module immer
 @ ../node_modules/@perses-dev/components/dist/Legend/index.js
 @ ../node_modules/@perses-dev/components/dist/index.js
 @ consume shared module (default) @perses-dev/components@^0.51.0-beta.0 (strict) (fallback: /home/runner/work/plugins/plugins/node_modules/@perses-dev/components/dist/index.js)
 @ ./src/BarChartOptionsEditorSettings.tsx
 @ ./src/BarChart.ts
 @ container entry
File: /home/runner/work/plugins/plugins/node_modules/@perses-dev/components/dist/ThresholdsEditor/ThresholdsEditor.js:1:1
  ⚠ No required version specified and unable to automatically determine one. Unable to find required version for "immer" in description file/s
  │ /home/runner/work/plugins/plugins/node_modules/@perses-dev/components/package.json
  │ /home/runner/work/plugins/plugins/package.json
  │ It need to be in dependencies, devDependencies or peerDependencies. file: shared module immer
 @ ../node_modules/@perses-dev/components/dist/ThresholdsEditor/index.js
 @ ../node_modules/@perses-dev/components/dist/index.js
 @ consume shared module (default) @perses-dev/components@^0.51.0-beta.0 (strict) (fallback: /home/runner/work/plugins/plugins/node_modules/@perses-dev/components/dist/index.js)
 @ ./src/BarChartOptionsEditorSettings.tsx
 @ ./src/BarChart.ts
 @ container entry
File: /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/dist/remote/PluginRuntime.js:1:1
  ⚠ No required version specified and unable to automatically determine one. Unable to find required version for "@emotion/styled" in description file/s
  │ /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/package.json
  │ /home/runner/work/plugins/plugins/package.json
  │ It need to be in dependencies, devDependencies or peerDependencies. file: shared module @emotion/styled
 @ ../node_modules/@perses-dev/plugin-system/dist/remote/remotePluginLoader.js
 @ ../node_modules/@perses-dev/plugin-system/dist/remote/index.js
 @ ../node_modules/@perses-dev/plugin-system/dist/index.js
 @ consume shared module (default) @perses-dev/plugin-system@^0.51.0-beta.0 (strict) (fallback: /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/dist/index.js)
 @ ./src/BarChartOptionsEditorSettings.tsx
 @ ./src/BarChart.ts
 @ container entry
File: /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/dist/remote/PluginRuntime.js:1:1
  ⚠ No required version specified and unable to automatically determine one. Unable to find required version for "lodash" in description file/s
  │ /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/package.json
  │ /home/runner/work/plugins/plugins/package.json
  │ It need to be in dependencies, devDependencies or peerDependencies. file: shared module lodash
 @ ../node_modules/@perses-dev/plugin-system/dist/remote/remotePluginLoader.js
 @ ../node_modules/@perses-dev/plugin-system/dist/remote/index.js
 @ ../node_modules/@perses-dev/plugin-system/dist/index.js
 @ consume shared module (default) @perses-dev/plugin-system@^0.51.0-beta.0 (strict) (fallback: /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/dist/index.js)
 @ ./src/BarChartOptionsEditorSettings.tsx
 @ ./src/BarChart.ts
 @ container entry
File: /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/dist/remote/PluginRuntime.js:1:1
  ⚠ No required version specified and unable to automatically determine one. Unable to find required version for "date-fns-tz" in description file/s
  │ /home/runner/work/plugins/plugins/package.json
  │ /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/package.json
  │ It need to be in dependencies, devDependencies or peerDependencies. file: shared module date-fns-tz
 @ ../node_modules/@perses-dev/plugin-system/dist/remote/remotePluginLoader.js
 @ ../node_modules/@perses-dev/plugin-system/dist/remote/index.js
 @ ../node_modules/@perses-dev/plugin-system/dist/index.js
 @ consume shared module (default) @perses-dev/plugin-system@^0.51.0-beta.0 (strict) (fallback: /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/dist/index.js)
 @ ./src/BarChartOptionsEditorSettings.tsx
 @ ./src/BarChart.ts
 @ container entry
File: /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/dist/remote/PluginRuntime.js:1:1
  ⚠ No required version specified and unable to automatically determine one. Unable to find required version for "echarts" in description file/s
  │ /home/runner/work/plugins/plugins/package.json
  │ /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/package.json
  │ It need to be in dependencies, devDependencies or peerDependencies. file: shared module echarts
 @ ../node_modules/@perses-dev/plugin-system/dist/remote/remotePluginLoader.js
 @ ../node_modules/@perses-dev/plugin-system/dist/remote/index.js
 @ ../node_modules/@perses-dev/plugin-system/dist/index.js
 @ consume shared module (default) @perses-dev/plugin-system@^0.51.0-beta.0 (strict) (fallback: /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/dist/index.js)
 @ ./src/BarChartOptionsEditorSettings.tsx
 @ ./src/BarChart.ts
 @ container entry

Originally posted by @Nexucis in #73 (review)

description file/s
  │ /home/runner/work/plugins/plugins/package.json
  │ /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/package.json

I think it looks at the wrong file, shouldn't it look in package.json in the plugin subfolder: https://github.com/perses/plugins/blob/main/barchart/package.json#L29?
Alternatively, I've seen configs where rsbuild.config.ts imports package.json and specifies requiredVersion here: https://github.com/perses/plugins/blob/main/barchart/rsbuild.config.ts#L54

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions