janus-idp / backstage-showcase

Enterprise-ready Backstage distribution
https://showcase.janus-idp.io
Apache License 2.0
105 stars 141 forks source link

yarn: TypeError: true is not iterable! using a dynamic plugin #1244

Open cmoulliard opened 2 months ago

cmoulliard commented 2 months ago

Issue or new feature request or ...

To test the backward compatibility of the dynamic module with our backstage project, I registered one of our "dynamic" plugin like this:

"@qshift/plugin-quarkus-backend": "file:/Users/cmoullia/temp/dynamic-plugins-root/qshift-plugin-quarkus-backend-dynamic-0.1.28.tgz",

When I execute yarn install on our backstage project: https://github.com/q-shift/backstage-playground, I got this error.

warning "workspace-aggregator-232ebc6a-91c5-4140-b754-43cf68d28956 > backend > @qshift/plugin-quarkus-backend@0.1.28" has unmet peer dependency "@backstage/backend-dynamic-feature-service@^0.2.7".
warning "workspace-aggregator-232ebc6a-91c5-4140-b754-43cf68d28956 > backend > @qshift/plugin-quarkus-backend@0.1.28" has unmet peer dependency "@backstage/plugin-scaffolder-node@^0.3.3".
error TypeError: true is not iterable!
    at module.exports.module.exports.__webpack_require__.getIterator (/Users/cmoullia/.cache/node/corepack/yarn/1.22.21/lib/cli.js:101500:42)
    at PackageLinker.<anonymous> (/Users/cmoullia/.cache/node/corepack/yarn/1.22.21/lib/cli.js:48417:192)
    at Generator.next (<anonymous>)
    at step (/Users/cmoullia/.cache/node/corepack/yarn/1.22.21/lib/cli.js:310:30)
    at /Users/cmoullia/.cache/node/corepack/yarn/1.22.21/lib/cli.js:328:14
    at new Promise (<anonymous>)
    at new F (/Users/cmoullia/.cache/node/corepack/yarn/1.22.21/lib/cli.js:5540:28)
    at PackageLinker.<anonymous> (/Users/cmoullia/.cache/node/corepack/yarn/1.22.21/lib/cli.js:307:12)
    at PackageLinker.linkBinDependencies (/Users/cmoullia/.cache/node/corepack/yarn/1.22.21/lib/cli.js:48464:20)
    at /Users/cmoullia/.cache/node/corepack/yarn/1.22.21/lib/cli.js:49030:28

The problem is described here: https://github.com/yarnpkg/yarn/issues/7334#issuecomment-1348472631 and related to the fact that the package.json file of dist-dynamic includes the property bundleDependencies: true. If we remove it then the problem is gone

Can janus-idp cli disable it when the dynamic package is generated or do we need to embed the nodes_modules ?