-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
22.0.8 doesn't support extending config from another workspace #3084
Comments
Hi, I'm the author of the related PR and the underlying I have not used monorepos in years, and I am not aware of the inner workings of In the meantime, you could also try to run the release process with |
|
@brummelte please provide more information about your setup. Your issue doesn't seem related to this one at first glance. |
semantic release 22.0.7 works, 22.0.8 doesn't. Using yarn with
release.config.js
The package is in my package.json. For me this seems to be the same issue, just that I don't use multi-semantic-release. So should be even easier to reproduce. |
Hey @bryanjtc, @brummelte. Sorry for the delay, having very little free time lately. Could you please provide a minimum reproduction repository so I can look into these issues further? That would be really appreciated. Thanks in advance! |
@sheerlox jumping in error log
|
@francoisauclair911 thank you for providing that, I'll do my best to free some time in the next 48h hours to see what I can do! |
@francoisauclair911 your problem is not related to this issue, which is specifically about yarn workspaces. Your issue is that the top-level To resolve your issue, you should either convert your config to ESM, or change the extension to The error can be seen with |
@sheerlox Sorry for the delayed response. The error came from a private monorepo, so I couldn't share the code. I have another public monorepo where I found the same error. The log error came from a dry run in a github action. Run unset GITHUB_ACTIONS && DEBUG=import-from-esm yarn workspaces foreach -W --no-private --topological-dev run semantic-release --dry-run --no-ci --branches ${HEAD_REF} -e semantic-release-monorepo
[11:11:42 PM] [semantic-release] › ℹ Running semantic-release version 23.0.2
2024-02-15T23:11:42.260Z import-from-esm Executing importFrom('/home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib', 'semantic-release-monorepo')
2024-02-15T23:11:42.260Z import-from-esm 'semantic-release-monorepo' is not a file module
2024-02-15T23:11:42.260Z import-from-esm Trying to resolve 'semantic-release-monorepo' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/noop.js'
2024-02-15T23:11:42.262Z import-from-esm Failed to resolve 'semantic-release-monorepo' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/noop.js': Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'semantic-release-monorepo' imported from /home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/noop.js
2024-02-15T23:11:42.262Z import-from-esm Trying to resolve 'semantic-release-monorepo.js' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/noop.js'
2024-02-15T23:11:42.263Z import-from-esm Failed to resolve 'semantic-release-monorepo.js' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/noop.js': Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'semantic-release-monorepo.js' imported from /home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/noop.js
2024-02-15T23:11:42.263Z import-from-esm Trying to resolve 'semantic-release-monorepo.mjs' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/noop.js'
2024-02-15T23:11:42.263Z import-from-esm Failed to resolve 'semantic-release-monorepo.mjs' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/noop.js': Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'semantic-release-monorepo.mjs' imported from /home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/noop.js
2024-02-15T23:11:42.263Z import-from-esm Trying to resolve 'semantic-release-monorepo.cjs' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/noop.js'
2024-02-15T23:11:42.264Z import-from-esm Failed to resolve 'semantic-release-monorepo.cjs' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/noop.js': Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'semantic-release-monorepo.cjs' imported from /home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/noop.js
2024-02-15T23:11:42.264Z import-from-esm Trying to resolve 'semantic-release-monorepo.json' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/noop.js'
2024-02-15T23:11:42.265Z import-from-esm Failed to resolve 'semantic-release-monorepo.json' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/noop.js': Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'semantic-release-monorepo.json' imported from /home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/noop.js
2024-02-15T23:11:42.265Z import-from-esm Cannot find module 'semantic-release-monorepo'
2024-02-15T23:11:42.265Z import-from-esm Executing importFrom('/home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/packages/postcss-colorguard', 'semantic-release-monorepo')
2024-02-15T23:11:42.265Z import-from-esm 'semantic-release-monorepo' is not a file module
2024-02-15T23:11:42.265Z import-from-esm Trying to resolve 'semantic-release-monorepo' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/packages/postcss-colorguard/noop.js'
2024-02-15T23:11:42.266Z import-from-esm Failed to resolve 'semantic-release-monorepo' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/packages/postcss-colorguard/noop.js': Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'semantic-release-monorepo' imported from /home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/packages/postcss-colorguard/noop.js
2024-02-15T23:11:42.266Z import-from-esm Trying to resolve 'semantic-release-monorepo.js' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/packages/postcss-colorguard/noop.js'
2024-02-15T23:11:42.266Z import-from-esm Failed to resolve 'semantic-release-monorepo.js' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/packages/postcss-colorguard/noop.js': Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'semantic-release-monorepo.js' imported from /home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/packages/postcss-colorguard/noop.js
2024-02-15T23:11:42.266Z import-from-esm Trying to resolve 'semantic-release-monorepo.mjs' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/packages/postcss-colorguard/noop.js'
2024-02-15T23:11:42.267Z import-from-esm Failed to resolve 'semantic-release-monorepo.mjs' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/packages/postcss-colorguard/noop.js': Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'semantic-release-monorepo.mjs' imported from /home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/packages/postcss-colorguard/noop.js
2024-02-15T23:11:42.267Z import-from-esm Trying to resolve 'semantic-release-monorepo.cjs' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/packages/postcss-colorguard/noop.js'
2024-02-15T23:11:42.267Z import-from-esm Failed to resolve 'semantic-release-monorepo.cjs' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/packages/postcss-colorguard/noop.js': Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'semantic-release-monorepo.cjs' imported from /home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/packages/postcss-colorguard/noop.js
2024-02-15T23:11:42.267Z import-from-esm Trying to resolve 'semantic-release-monorepo.json' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/packages/postcss-colorguard/noop.js'
2024-02-15T23:11:42.26[8](https://github.com/bryanjtc/css-colorguard-upgraded/actions/runs/7923512677/job/21633373875?pr=278#step:7:9)Z import-from-esm Failed to resolve 'semantic-release-monorepo.json' from 'file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/packages/postcss-colorguard/noop.js': Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'semantic-release-monorepo.json' imported from /home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/packages/postcss-colorguard/noop.js
2024-02-15T23:11:42.268Z import-from-esm Cannot find module 'semantic-release-monorepo'
[11:11:42 PM] [semantic-release] › ✘ An error occurred while running semantic-release: Error: Cannot find module 'semantic-release-monorepo'
at importFrom (file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/import-from-esm-npm-1.3.3-4c64f2[9](https://github.com/bryanjtc/css-colorguard-upgraded/actions/runs/7923512677/job/21633373875?pr=278#step:7:10)7d5-3f30a7bcce.zip/node_modules/import-from-esm/index.js:[10](https://github.com/bryanjtc/css-colorguard-upgraded/actions/runs/7923512677/job/21633373875?pr=278#step:7:11)0:17)
at async file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/get-config.js:36:85
at async default (file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/get-config.js:34:[11](https://github.com/bryanjtc/css-colorguard-upgraded/actions/runs/7923512677/job/21633373875?pr=278#step:7:12))
at async Module.default (file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e4[17](https://github.com/bryanjtc/css-colorguard-upgraded/actions/runs/7923512677/job/21633373875?pr=278#step:7:18)c507cf-a0d1ff971f.zip/node_modules/semantic-release/index.js:274:34)
at async default (file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-[23](https://github.com/bryanjtc/css-colorguard-upgraded/actions/runs/7923512677/job/21633373875?pr=278#step:7:24).0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/cli.js:55:5) {
code: 'MODULE_NOT_FOUND'
}
Error: Cannot find module 'semantic-release-monorepo'
at importFrom (file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/import-from-esm-npm-1.3.3-4c64f297d5-3f30a7bcce.zip/node_modules/import-from-esm/index.js:100:17)
at async file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/get-config.js:36:85
at async default (file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/lib/get-config.js:34:11)
at async Module.default (file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e417c507cf-a0d1ff971f.zip/node_modules/semantic-release/index.js:[27](https://github.com/bryanjtc/css-colorguard-upgraded/actions/runs/7923512677/job/21633373875?pr=278#step:7:28)4:[34](https://github.com/bryanjtc/css-colorguard-upgraded/actions/runs/7923512677/job/21633373875?pr=278#step:7:35))
at async default (file:///home/runner/work/css-colorguard-upgraded/css-colorguard-upgraded/.yarn/cache/semantic-release-npm-23.0.2-e[41](https://github.com/bryanjtc/css-colorguard-upgraded/actions/runs/7923512677/job/21633373875?pr=278#step:7:42)7c507cf-a0d1ff971f.zip/node_modules/semantic-release/cli.js:55:5) {
code: 'MODULE_NOT_FOUND'
The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph
Failed with errors in 1s [50](https://github.com/bryanjtc/css-colorguard-upgraded/actions/runs/7923512677/job/21633373875?pr=278#step:7:51)9ms
Error: Process completed with exit code 1. Here is the branch of the monorepo that has the latest semantic-release version and an esm config file. |
My error was with just using yarn and not in a monorepo. Maybe it is a different problem, but the logs don't say anything relevant. |
Thanks for providing a way for me to reproduce the error @bryanjtc, I'll try my best to tackle this issue in the coming weeks. @brummelte I don't think the issue is with I'll dig deeper when I get the chance! |
I'm neither using semantic-release-monorepo, nor yarn workspaces, nor esm in the project that is not working anymore. Just yarn pnp and a shared semantic release config with common js. Maybe it's already fixed in the issue you mentioned, the version (https://github.com/sheerlox/import-from-esm/releases/tag/v1.4.0-alpha.1) is just not used yet. |
Same here. Correction: I am using yarn pnp + yarn workspaces.
That didn't fix it for me. It worked for me, when I:
So importing when the dependency is only given inside the workspace is still broken. |
Current behavior
A new dependency was added to resolve an issue with windows paths in 22.0.8, import-from-esm. Now I have an error if I extend from a local config or a local package from another workspace.
Expected behavior
No error
semantic-release
version22.0.8
CI environment
Gitlab
Plugins used
No response
semantic-release
configurationCONFIG 1
CONFIG 2: Extends from config 1
CI logs
The text was updated successfully, but these errors were encountered: