saitho / semantic-release-backmerge

:twisted_rightwards_arrows: semantic-release plugin to back-merge a release into a develop branch
https://saitho.github.io/semantic-release-backmerge/
56 stars 11 forks source link

ReferenceError: require is not defined #52

Closed MAN-Sendance closed 9 months ago

MAN-Sendance commented 1 year ago

Is there an existing issue for this?

Current Behavior

Backmerging fails due to ReferenceError: require is not defined

Expected Behavior

Backmerging does not throw this error

Steps To Reproduce

const backmergeOptions = {
  backmergeBranches: [process.env.SEMANTIC_RELEASE_BACKMERGE_BRANCH], // merge back from release into main branch
  clearWorkspace: true, // stash everything to avoid conflicts
  plugins: [
    [
      '@semantic-release/exec',
      {
        'successCmd': 'cd .. && cd .. && npm install && git add package-lock.json'
      }
    ]
  ]
}

Environment

- **semantic-release/semantic-release** version: 21.0.5
- **@saithodev/semantic-release-backmerge** version: 3.2.0
- **@qiwi/multi-semantic-release** version: 7.0.0

Anything else?

[4:58:11 AM] [@sendance/commitlint-config-standard] [@saithodev/semantic-release-backmerge] › ✘  ReferenceError: require is not defined 
    at loadPlugins (file:///usr/local/lib/node_modules/@saithodev/semantic-release-backmerge/dist/helpers/plugins.js:31:31)
    at triggerPluginHooks (file:///usr/local/lib/node_modules/@saithodev/semantic-release-backmerge/dist/perform-backmerge.js:115:21)
    at performBackmergeIntoBranch (file:///usr/local/lib/node_modules/@saithodev/semantic-release-backmerge/dist/perform-backmerge.js:48:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async performBackmerge (file:///usr/local/lib/node_modules/@saithodev/semantic-release-backmerge/dist/perform-backmerge.js:99:13)
    at async success (file:///usr/local/lib/node_modules/@saithodev/semantic-release-backmerge/dist/index.js:52:5)
    at async validator (file:///usr/local/lib/node_modules/@qiwi/multi-semantic-release/node_modules/semantic-release/lib/plugins/normalize.js:36:24)
    at async file:///usr/local/lib/node_modules/@qiwi/multi-semantic-release/node_modules/semantic-release/lib/plugins/pipeline.js:38:36
    at async file:///usr/local/lib/node_modules/@qiwi/multi-semantic-release/node_modules/semantic-release/lib/plugins/pipeline.js:32:5
    at async pluginsConfigAccumulator.<computed> [as success] (file:///usr/local/lib/node_modules/@qiwi/multi-semantic-release/node_modules/semantic-release/lib/plugins/index.js:87:11)
abhishekzepto commented 11 months ago

@MAN-Sendance , did you find any solution to this issue?

abhishekzepto commented 11 months ago

@saitho , please help here

MAN-Sendance commented 11 months ago

@MAN-Sendance , did you find any solution to this issue?

Unfortunately not. However, I guess it is caused by outdated dependencies (semantic-release) that would require a new release by @saitho.

kouvaliasnick commented 10 months ago

Any solutions on this? I'm facing the exact same issue

QuentinLeloire commented 10 months ago

Has anyone found a method to temporarly fix it ?

saitho commented 9 months ago

@MAN-Sendance @abhishekzepto @kouvaliasnick @QuentinLeloire

Hey guys, I just published a new version v4.0.0 for semantic-release v22. The issue should be fixed there (thanks to @evenius!! :)

MAN-Sendance commented 9 months ago

@MAN-Sendance @abhishekzepto @kouvaliasnick @QuentinLeloire

Hey guys, I just published a new version v4.0.0 for semantic-release v22. The issue should be fixed there (thanks to @evenius!! :)

Thanks a million @saitho Great job!