Hide Forgot
Description of problem: Dynamic demo plugin fails to build, steps to reproduce: $ git clone https://github.com/openshift/console.git $ cd console $ ( cd frontend ; yarn install ) $ ( cd dynamic-demo-plugin ; yarn install && yarn build-dev )
I can see following errors ERROR in container entry K8sAPIConsumer[6] Module not found: Error: Can't resolve './components/K8sConsumer/K8sAPIConsumer.tsx' in '/root/odev/src/github.com/openshift/console/dynamic-demo-plugin/src' ERROR in /root/odev/src/github.com/openshift/console/dynamic-demo-plugin/src/components/k8sConsumer/K8sAPIConsumer.tsx [tsl] ERROR in /root/odev/src/github.com/openshift/console/dynamic-demo-plugin/src/components/k8sConsumer/K8sAPIConsumer.tsx(13,10) TS2305: Module '"../../../node_modules/@openshift-console/dynamic-plugin-sdk/lib/lib-core"' has no exported member 'k8sCreate'. ERROR in /root/odev/src/github.com/openshift/console/dynamic-demo-plugin/src/components/k8sConsumer/K8sAPIConsumer.tsx [tsl] ERROR in /root/odev/src/github.com/openshift/console/dynamic-demo-plugin/src/components/k8sConsumer/K8sAPIConsumer.tsx(13,21) TS2305: Module '"../../../node_modules/@openshift-console/dynamic-plugin-sdk/lib/lib-core"' has no exported member 'k8sDelete'. ERROR in /root/odev/src/github.com/openshift/console/dynamic-demo-plugin/src/components/k8sConsumer/K8sAPIConsumer.tsx [tsl] ERROR in /root/odev/src/github.com/openshift/console/dynamic-demo-plugin/src/components/k8sConsumer/K8sAPIConsumer.tsx(13,32) TS2305: Module '"../../../node_modules/@openshift-console/dynamic-plugin-sdk/lib/lib-core"' has no exported member 'k8sGet'. ERROR in /root/odev/src/github.com/openshift/console/dynamic-demo-plugin/src/components/k8sConsumer/K8sAPIConsumer.tsx [tsl] ERROR in /root/odev/src/github.com/openshift/console/dynamic-demo-plugin/src/components/k8sConsumer/K8sAPIConsumer.tsx(13,40) TS2305: Module '"../../../node_modules/@openshift-console/dynamic-plugin-sdk/lib/lib-core"' has no exported member 'k8sList'. ERROR in /root/odev/src/github.com/openshift/console/dynamic-demo-plugin/src/components/k8sConsumer/K8sAPIConsumer.tsx [tsl] ERROR in /root/odev/src/github.com/openshift/console/dynamic-demo-plugin/src/components/k8sConsumer/K8sAPIConsumer.tsx(13,49) TS2305: Module '"../../../node_modules/@openshift-console/dynamic-plugin-sdk/lib/lib-core"' has no exported member 'k8sPatch'. ERROR in /root/odev/src/github.com/openshift/console/dynamic-demo-plugin/src/components/k8sConsumer/K8sAPIConsumer.tsx [tsl] ERROR in /root/odev/src/github.com/openshift/console/dynamic-demo-plugin/src/components/k8sConsumer/K8sAPIConsumer.tsx(13,78) TS2305: Module '"../../../node_modules/@openshift-console/dynamic-plugin-sdk/lib/lib-core"' has no exported member 'k8sUpdate'. ERROR in /root/odev/src/github.com/openshift/console/dynamic-demo-plugin/src/components/k8sConsumer/k8s-data.ts [tsl] ERROR in /root/odev/src/github.com/openshift/console/dynamic-demo-plugin/src/components/k8sConsumer/k8s-data.ts(1,10) TS2305: Module '"../../../node_modules/@openshift-console/dynamic-plugin-sdk/lib/api/common-types"' has no exported member 'K8sModel'. ERROR in console-extensions.json (1 errors) Invalid module 'K8sAPIConsumer' in extensions[26] property 'component' (node:2095) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET] DeprecationWarning: Compilation.modules was changed from Array to Set (using Array method 'reduce' is deprecated) (Use `node --trace-deprecation ...` to show where the warning was created) (node:2095) [DEP_WEBPACK_MODULE_ERRORS] DeprecationWarning: Module.errors was removed (use getErrors instead) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Looks like the cause of this is in https://github.com/openshift/console/pull/10243
Yadan, please see the associated PR. Applying it on top of latest Console master branch should fix the issue.
1. pull latest console code 2. cd frontend; yarn install 3. cd dynamic-demo-plugin ; yarn install && yarn run build ) [root@preserved-qe-ui-rhel-1 dynamic-demo-plugin]# yarn run build yarn run v1.22.15 $ yarn clean && yarn generate && NODE_ENV=production NODE_OPTIONS=--max-old-space-size=4096 yarn ts-node ./node_modules/.bin/webpack --mode=production $ rm -rf ./public/dist $ yarn generate-graphql && yarn build-plugin-sdk $ graphql-codegen --config graphql-codegen.yml ✔ Parse configuration ✔ Generate outputs $ yarn --cwd packages/console-dynamic-plugin-sdk build $ yarn clean && yarn validate && yarn compile && yarn generate $ rm -rf dist generated $ yarn ts-node scripts/validate-extensions.ts $ ts-node -O '{"module":"commonjs"}' scripts/validate-extensions.ts Validating Console extension types Warnings (42) Extension type 'PVCCreateProp' has no JSDoc comments Extension type 'PVCStatus' has no JSDoc comments Extension type 'PVCAlert' has no JSDoc comments Extension type 'PVCDelete' has no JSDoc comments Extension type 'AddAction' has no JSDoc comments Extension type 'AddActionGroup' has no JSDoc comments Extension type 'ClusterGlobalConfig' has no JSDoc comments Extension type 'HrefNavItem' has no JSDoc comments Extension type 'ResourceNSNavItem' has no JSDoc comments Extension type 'ResourceClusterNavItem' has no JSDoc comments Extension type 'Separator' has no JSDoc comments Extension type 'NavSection' has no JSDoc comments Extension type 'FileUpload' has no JSDoc comments Extension type 'AlertAction' has no JSDoc comments Extension type 'AlertAction' property 'alert' has no JSDoc comments Extension type 'AlertAction' property 'text' has no JSDoc comments Extension type 'AlertAction' property 'action' has no JSDoc comments Extension type 'StorageProvider' has no JSDoc comments Extension type 'StorageProvider' property 'name' has no JSDoc comments Extension type 'StorageProvider' property 'Component' has no JSDoc comments Extension type 'TelemetryListener' has no JSDoc comments Extension type 'CatalogItemType' has no JSDoc comments Extension type 'CatalogItemProvider' has no JSDoc comments Extension type 'CatalogItemFilter' has no JSDoc comments Extension type 'PodAdapter' property 'adapt' has no JSDoc comments Extension type 'BuildAdapter' property 'adapt' has no JSDoc comments Extension type 'NetworkAdapter' property 'adapt' has no JSDoc comments Extension type 'TopologyDisplayFilters' property 'getTopologyFilters' has no JSDoc comments Extension type 'TopologyDisplayFilters' property 'applyDisplayOptions' has no JSDoc comments Extension type 'TopologyDecoratorProvider' property 'id' has no JSDoc comments Extension type 'TopologyDecoratorProvider' property 'priority' has no JSDoc comments Extension type 'TopologyDecoratorProvider' property 'quadrant' has no JSDoc comments Extension type 'TopologyDecoratorProvider' property 'decorator' has no JSDoc comments Extension type 'TopologyRelationshipProvider' property 'provides' has no JSDoc comments Extension type 'TopologyRelationshipProvider' property 'tooltip' has no JSDoc comments Extension type 'TopologyRelationshipProvider' property 'create' has no JSDoc comments Extension type 'TopologyRelationshipProvider' property 'priority' has no JSDoc comments Extension type 'CreateResource' has no JSDoc comments Extension type 'UserPreferenceGroup' has no JSDoc comments Extension type 'UserPreferenceItem' has no JSDoc comments Extension type 'Perspective' has no JSDoc comments Extension type 'HorizontalNavTab' has no JSDoc comments $ for ext in '' '-internal' '-internal-kubevirt' '-webpack' ; do yarn tsc -p tsconfig${ext}.json ; done $ /root/odev/src/github.com/openshift/console/frontend/node_modules/.bin/tsc -p tsconfig.json $ /root/odev/src/github.com/openshift/console/frontend/node_modules/.bin/tsc -p tsconfig-internal.json $ /root/odev/src/github.com/openshift/console/frontend/node_modules/.bin/tsc -p tsconfig-internal-kubevirt.json $ /root/odev/src/github.com/openshift/console/frontend/node_modules/.bin/tsc -p tsconfig-webpack.json $ yarn generate-schema && yarn generate-doc && yarn generate-pkg-assets $ yarn ts-node scripts/generate-schema.ts $ ts-node -O '{"module":"commonjs"}' scripts/generate-schema.ts Generating Console plugin JSON schemas generated/schema/plugin-package.json generated/schema/plugin-package.cjs generated/schema/console-extensions.json generated/schema/console-extensions.cjs generated/schema/plugin-manifest.json generated/schema/plugin-manifest.cjs $ yarn ts-node scripts/generate-doc.ts $ ts-node -O '{"module":"commonjs"}' scripts/generate-doc.ts Generating Console plugin documentation generated/doc/console-extensions.md $ yarn ts-node scripts/generate-pkg-assets.ts $ ts-node -O '{"module":"commonjs"}' scripts/generate-pkg-assets.ts Generating assets for package @openshift-console/dynamic-plugin-sdk dist/core/package.json dist/core/LICENSE dist/core/README.md dist/core/doc Generating assets for package @openshift-console/dynamic-plugin-sdk-internal dist/internal/package.json dist/internal/LICENSE dist/internal/README.md Generating assets for package @openshift-console/dynamic-plugin-sdk-internal-kubevirt dist/internal-kubevirt/package.json dist/internal-kubevirt/LICENSE dist/internal-kubevirt/README.md Generating assets for package @openshift-console/dynamic-plugin-sdk-webpack dist/webpack/package.json dist/webpack/LICENSE dist/webpack/README.md dist/webpack/schema $ ts-node -O '{"module":"commonjs"}' ./node_modules/.bin/webpack --mode=production Starting type checking service... Done in 505.09s. no errors
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:0056