byCedric / semantic-release-expo

An Expo implementation for semantic release, so you don't have to bother.
MIT License
91 stars 11 forks source link

Error: Cannot find module '@semantic-release/error' #205

Closed Borduhh closed 3 years ago

Borduhh commented 3 years ago

Get this error when running Github Actions:

Error: Cannot find module '@semantic-release/error'
Require stack:
- /home/runner/work/chargeport-emp/chargeport-emp/node_modules/semantic-release-expo/build/src/scripts/prepare.js
- /home/runner/work/chargeport-emp/chargeport-emp/node_modules/semantic-release-expo/build/src/index.js
- /home/runner/.npm/_npx/2106/lib/node_modules/semantic-release/lib/plugins/utils.js
- /home/runner/.npm/_npx/2106/lib/node_modules/semantic-release/lib/plugins/index.js
- /home/runner/.npm/_npx/2106/lib/node_modules/semantic-release/lib/get-config.js
- /home/runner/.npm/_npx/2106/lib/node_modules/semantic-release/index.js
- /home/runner/.npm/_npx/2106/lib/node_modules/semantic-release/cli.js
- /home/runner/.npm/_npx/2106/lib/node_modules/semantic-release/bin/semantic-release.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
    at Function.Module._load (internal/modules/cjs/loader.js:745:27)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/home/runner/work/chargeport-emp/chargeport-emp/node_modules/semantic-release-expo/build/src/scripts/prepare.js:18:30)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Module.require (internal/modules/cjs/loader.js:961:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/runner/work/chargeport-emp/chargeport-emp/node_modules/semantic-release-expo/build/src/scripts/prepare.js',
    '/home/runner/work/chargeport-emp/chargeport-emp/node_modules/semantic-release-expo/build/src/index.js',
    '/home/runner/.npm/_npx/2106/lib/node_modules/semantic-release/lib/plugins/utils.js',
    '/home/runner/.npm/_npx/2106/lib/node_modules/semantic-release/lib/plugins/index.js',
    '/home/runner/.npm/_npx/2106/lib/node_modules/semantic-release/lib/get-config.js',
    '/home/runner/.npm/_npx/2106/lib/node_modules/semantic-release/index.js',
    '/home/runner/.npm/_npx/2106/lib/node_modules/semantic-release/cli.js',
    '/home/runner/.npm/_npx/2106/lib/node_modules/semantic-release/bin/semantic-release.js'
  ]
}

release.config.js

module.exports = {
  branches: [{ name: 'main' }, { name: 'beta', prerelease: true }],
  plugins: [
    '@semantic-release/commit-analyzer',
    '@semantic-release/release-notes-generator',
    'semantic-release-expo',
    '@semantic-release/changelog',
    '@semantic-release/npm',
    '@semantic-release/github',
    [
      '@semantic-release/git',
      {
        message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
        assets: ['CHANGELOG.md', 'package.json', 'package-lock.json', 'app.config.js'],
      },
    ],
  ],
};
Borduhh commented 3 years ago

It looks like this was moved away from the default semantic release package and now needs to be included in the deps.

https://www.npmjs.com/package/@semantic-release/error