无论我做什么,当我在 BitBucket 管道中运行命令“npx semantic-release --debug”时,总是会遇到完全相同的错误。试运行似乎运行良好。
我已经尝试过的事情:
- 重新安装节点模块
- 更新包
- 从具有工作语义发布的项目中复制完全相同的配置/包
所有文件肯定都在那里。也许它无法访问?
这是完整的调试报告:
npx: installed 746 in 16.856s
[5:36:26 PM] [semantic-release] › ℹ Running semantic-release version 17.1.1
2020-06-25T17:36:26.883Z semantic-release:config load config from: /opt/atlassian/pipelines/agent/build/package.json
2020-06-25T17:36:26.887Z semantic-release:config options values: {
branches: [ 'master', 'develop' ],
repositoryUrl: 'git@$NEXUS_USERNAME.org:acurable/acupebble-g2-firmware.git',
tagFormat: 'v${version}',
plugins: [
[ '@semantic-release/commit-analyzer', [Object] ],
[ '@semantic-release/npm', [Object] ],
[ '@semantic-release/release-notes-generator', [Object] ],
'@semantic-release/changelog',
'@semantic-release/git'
],
_: [],
debug: true,
'$0': '/root/.npm/_npx/52/bin/semantic-release'
}
[5:36:27 PM] [semantic-release] › ✖ An error occurred while running semantic-release: Error: Cannot find module '../output'
Require stack:
- /opt/atlassian/pipelines/agent/build/node_modules/fs-extra/lib/json/output-json.js
- /opt/atlassian/pipelines/agent/build/node_modules/fs-extra/lib/json/index.js
- /opt/atlassian/pipelines/agent/build/node_modules/fs-extra/lib/index.js
- /opt/atlassian/pipelines/agent/build/node_modules/@semantic-release/changelog/lib/prepare.js
- /opt/atlassian/pipelines/agent/build/node_modules/@semantic-release/changelog/index.js
- /root/.npm/_npx/52/lib/node_modules/semantic-release/lib/plugins/utils.js
- /root/.npm/_npx/52/lib/node_modules/semantic-release/lib/plugins/index.js
- /root/.npm/_npx/52/lib/node_modules/semantic-release/lib/get-config.js
- /root/.npm/_npx/52/lib/node_modules/semantic-release/index.js
- /root/.npm/_npx/52/lib/node_modules/semantic-release/cli.js
- /root/.npm/_npx/52/lib/node_modules/semantic-release/bin/semantic-release.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:952:15)
at Function.Module._load (internal/modules/cjs/loader.js:835:27)
at Module.require (internal/modules/cjs/loader.js:1012:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/opt/atlassian/pipelines/agent/build/node_modules/fs-extra/lib/json/output-json.js:4:24)
at Module._compile (internal/modules/cjs/loader.js:1123:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
at Module.load (internal/modules/cjs/loader.js:972:32)
at Function.Module._load (internal/modules/cjs/loader.js:872:14)
at Module.require (internal/modules/cjs/loader.js:1012:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/opt/atlassian/pipelines/agent/build/node_modules/fs-extra/lib/json/output-json.js',
'/opt/atlassian/pipelines/agent/build/node_modules/fs-extra/lib/json/index.js',
'/opt/atlassian/pipelines/agent/build/node_modules/fs-extra/lib/index.js',
'/opt/atlassian/pipelines/agent/build/node_modules/@semantic-release/changelog/lib/prepare.js',
'/opt/atlassian/pipelines/agent/build/node_modules/@semantic-release/changelog/index.js',
'/root/.npm/_npx/52/lib/node_modules/semantic-release/lib/plugins/utils.js',
'/root/.npm/_npx/52/lib/node_modules/semantic-release/lib/plugins/index.js',
'/root/.npm/_npx/52/lib/node_modules/semantic-release/lib/get-config.js',
'/root/.npm/_npx/52/lib/node_modules/semantic-release/index.js',
'/root/.npm/_npx/52/lib/node_modules/semantic-release/cli.js',
'/root/.npm/_npx/52/lib/node_modules/semantic-release/bin/semantic-release.js'
]
}
Error: Cannot find module '../output'
Require stack:
- /opt/atlassian/pipelines/agent/build/node_modules/fs-extra/lib/json/output-json.js
- /opt/atlassian/pipelines/agent/build/node_modules/fs-extra/lib/json/index.js
- /opt/atlassian/pipelines/agent/build/node_modules/fs-extra/lib/index.js
- /opt/atlassian/pipelines/agent/build/node_modules/@semantic-release/changelog/lib/prepare.js
- /opt/atlassian/pipelines/agent/build/node_modules/@semantic-release/changelog/index.js
- /root/.npm/_npx/52/lib/node_modules/semantic-release/lib/plugins/utils.js
- /root/.npm/_npx/52/lib/node_modules/semantic-release/lib/plugins/index.js
- /root/.npm/_npx/52/lib/node_modules/semantic-release/lib/get-config.js
- /root/.npm/_npx/52/lib/node_modules/semantic-release/index.js
- /root/.npm/_npx/52/lib/node_modules/semantic-release/cli.js
- /root/.npm/_npx/52/lib/node_modules/semantic-release/bin/semantic-release.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:952:15)
at Function.Module._load (internal/modules/cjs/loader.js:835:27)
at Module.require (internal/modules/cjs/loader.js:1012:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/opt/atlassian/pipelines/agent/build/node_modules/fs-extra/lib/json/output-json.js:4:24)
at Module._compile (internal/modules/cjs/loader.js:1123:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
at Module.load (internal/modules/cjs/loader.js:972:32)
at Function.Module._load (internal/modules/cjs/loader.js:872:14)
at Module.require (internal/modules/cjs/loader.js:1012:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/opt/atlassian/pipelines/agent/build/node_modules/fs-extra/lib/json/output-json.js',
'/opt/atlassian/pipelines/agent/build/node_modules/fs-extra/lib/json/index.js',
'/opt/atlassian/pipelines/agent/build/node_modules/fs-extra/lib/index.js',
'/opt/atlassian/pipelines/agent/build/node_modules/@semantic-release/changelog/lib/prepare.js',
'/opt/atlassian/pipelines/agent/build/node_modules/@semantic-release/changelog/index.js',
'/root/.npm/_npx/52/lib/node_modules/semantic-release/lib/plugins/utils.js',
'/root/.npm/_npx/52/lib/node_modules/semantic-release/lib/plugins/index.js',
'/root/.npm/_npx/52/lib/node_modules/semantic-release/lib/get-config.js',
'/root/.npm/_npx/52/lib/node_modules/semantic-release/index.js',
'/root/.npm/_npx/52/lib/node_modules/semantic-release/cli.js',
'/root/.npm/_npx/52/lib/node_modules/semantic-release/bin/semantic-release.js'
]
2020-06-25T17:36:27.964997083Z stderr P }