Visitar URL original
Travis CI currently broken · Issue #893 · shelljs/shelljs · GitHub
Skip to content

Travis CI currently broken #893

Closed
Closed

Description

@nfischer

Due to a npm change, npm install modifies package-lock.json, which turns bots red (we check for modified files at the end of the script).

Blocking #892, #889, and any other PRs.

Activity

  1. added 2 commits that reference this issue on Oct 10, 2018
    8ec8889
    fce2a6f
  2. nfischer commented on Oct 10, 2018

    @nfischer
    MemberAuthor

    Regression is likely in npm, within the range 5.6.0 (good build) and 6.4.1 (bad build).

  3. nfischer commented on Oct 10, 2018

    @nfischer
    MemberAuthor

    Turns out, the fix is not as simple as committing the new format.

    node version v8.12.0 v9.4.0 v10.4.0
    npm version 6.4.1 5.6.0 6.1.0
    Accepts master branch? no yes no
    Accepts this commit? yes no yes

    Might have to remove package-lock.json, or exclude it from this the file-check at the end.

  4. nfischer commented on Oct 10, 2018

    @nfischer
    MemberAuthor

    Or, maybe we can use npm ci instead of npm install on npm v6+

  5. hutson commented on Oct 23, 2018

    @hutson

    Modifications of package-lock.json by npm install is intentional - npm/npm#21043 (comment)

    The recommendation that I hear is to always use npm ci in CI builds to respect the package-lock.json as-is.

  6. nfischer commented on Oct 24, 2018

    @nfischer
    MemberAuthor

    @hbetts thanks for linking to the npm ticket. I figured this is probably intentional. The issue is that we need to conditionally run npm install for npm versions which don't know about npm ci.

    It would be nice to just install the newest npm and use that to install dependencies, but I think shelljs supports a wider range of node versions than npm.

    One way to detect support (since I forget which version introduced it) would be:

    $ npm help | egrep '\bci\b'
  7. self-assigned this
    on Oct 24, 2018
  8. hutson commented on Oct 24, 2018

    @hutson

    For what it's worth, npm ci was added in version 5.7.0. I also finally found their Node support policy.

    Though, I'm curious, even if you check for the existence of ci, how could the lock file changing issue get resolved on those versions of npm without ci?

  9. nfischer commented on Oct 25, 2018

    @nfischer
    MemberAuthor

    how could the lock file changing issue get resolved on those versions of npm without ci?

    Basic algorithm is:

    Check npm version
     - if >= 5.7, use `npm ci`
     - else, use `npm install`
    

    In the else-case, I don't expect npm install to change the package-lock. In the if-case, I expect (1) npm ci understands the package-lock, and (2) npm ci understands the package-lock in its format.

    I still need to verify these assumptions, however.

  10. added a commit that references this issue on Oct 25, 2018
    0e05418
  11. added a commit that references this issue on Oct 27, 2018
    37acb86
  12. added 2 commits that reference this issue on Nov 29, 2018
    e18fa5d
    f3ec88e
  13. nfischer commented on Nov 29, 2018

    @nfischer
    MemberAuthor

    Reopening because #896 is flaking on appveyor. Trying a different approach instead.

  14. nfischer commented on Nov 29, 2018

    @nfischer
    MemberAuthor

    #911 flakes as well, which makes me suspect ci-or-install works correctly (although is perhaps overly complicated), and it's appveyor which causes the flakiness.

  15. added a commit that references this issue on Nov 29, 2018
  16. added 2 commits that reference this issue on Nov 30, 2018
    87c1ff7
    c3bb1cc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions