Skip to content
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

Log error about promise rejection #144

Open
hmendezm opened this issue Jun 5, 2020 · 7 comments
Open

Log error about promise rejection #144

hmendezm opened this issue Jun 5, 2020 · 7 comments

Comments

@hmendezm
Copy link

hmendezm commented Jun 5, 2020

Current behavior

The Azure pipeline finished without error but when I checked the task semantic-release, I see the error below. I am not sure If it is working or not. if something did not finish. I do not see a new tag

Expected behavior

Not error at all.

Environment

semantic-release version: 17.0.8
CI environment: azure
Plugins used:
"release": {
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
"@semantic-release/changelog",
"@semantic-release/git"
],
"branch": ["master", "develop"]
}

CI logs:

2020-06-04T17:24:00.5581559Z ##[section]Starting: Semantic Release
2020-06-04T17:24:01.3404679Z ==============================================================================
2020-06-04T17:24:01.3405040Z Task : Semantic Release Freestyle
2020-06-04T17:24:01.3405376Z Description : Task for simplifying Semantic Release (0.0.53)
2020-06-04T17:24:01.3405637Z Version : 0.0.53
2020-06-04T17:24:01.3405868Z Author : Daniel Habenicht
2020-06-04T17:24:01.3406224Z Help : https://github.com/DanielHabenicht/AzurePipelines-SemanticRelease/issues
2020-06-04T17:24:01.3406617Z ==============================================================================
2020-06-04T17:24:02.3406982Z (node:1720) UnhandledPromiseRejectionWarning: Error: EISDIR: illegal operation on a directory, read
2020-06-04T17:24:02.3407897Z at Object.readSync (fs.js:498:3)
2020-06-04T17:24:02.3408363Z at tryReadSync (fs.js:332:20)
2020-06-04T17:24:02.3408856Z at Object.readFileSync (fs.js:369:19)
2020-06-04T17:24:02.3409633Z at Function.getConfig (D:\a_tasks\freestyle_87a45e6c-a243-455c-861d-37404e26212d\0.0.53\utility\utility.js:134:38)
2020-06-04T17:24:02.3410689Z at D:\a_tasks\freestyle_87a45e6c-a243-455c-861d-37404e26212d\0.0.53\index.js:26:42
2020-06-04T17:24:02.3411318Z at Generator.next ()
2020-06-04T17:24:02.3411927Z at D:\a_tasks\freestyle_87a45e6c-a243-455c-861d-37404e26212d\0.0.53\index.js:8:71
2020-06-04T17:24:02.3412548Z at new Promise ()
2020-06-04T17:24:02.3413208Z at __awaiter (D:\a_tasks\freestyle_87a45e6c-a243-455c-861d-37404e26212d\0.0.53\index.js:4:12)
2020-06-04T17:24:02.3413985Z at run (D:\a_tasks\freestyle_87a45e6c-a243-455c-861d-37404e26212d\0.0.53\index.js:24:12)
2020-06-04T17:24:02.3414820Z (node:1720) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
2020-06-04T17:24:02.3415790Z (node:1720) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
2020-06-04T17:24:02.3419916Z ##[section]Finishing: Semantic Release

PIpeline setup below

image
image
image

@DanielHabenicht
Copy link
Owner

DanielHabenicht commented Jun 5, 2020

Try to give the full path to your semantic release config.
Apart from that you are right, there should be an error.

@hmendezm
Copy link
Author

hmendezm commented Jun 5, 2020

Thank you Daniel for your reply
Do you mean to use a File path and not package.json in Config.path?

@hmendezm
Copy link
Author

hmendezm commented Jun 5, 2020

OK. I do not get the error but I get "This test run was triggered on the branch develop, while semantic-release is configured to only publish from master, therefore a new version won’t be published.". if you see the config below I am using branch and include develop branch as well.
"release": {
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
"@semantic-release/changelog",
"@semantic-release/git"
],
"branch": ["master", "develop"]
}

@DanielHabenicht
Copy link
Owner

Then that's a problem with semantic release. I think your configuration is outdated and it should be named branches. See here.

@DanielHabenicht
Copy link
Owner

Thank you Daniel for your reply
Do you mean to use a File path and not package.json in Config.path?

For "Config Path" you can use either the releaserc.json or package.json with the release property.

@hmendezm
Copy link
Author

hmendezm commented Jun 5, 2020

Daniel, thank you very much for your support.

What is the format for inline?
Should it be like this?
"release": {
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
"@semantic-release/changelog",
"@semantic-release/git"
],
"branches": ["master", "develop"]
}

@DanielHabenicht
Copy link
Owner

No without the release property. Just the content of the releaserc.json or release key in the package.json

So it would be like this:

{
    "plugins": [
      "@semantic-release/commit-analyzer",
      "@semantic-release/release-notes-generator",
      [
        "@semantic-release/npm",
        {
          "npmPublish": false
        }
      ],
      "@semantic-release/changelog",
      "@semantic-release/git"
    ],
    "branches":  ["master", "develop"]
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants