GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — No documented way to run without a lockfile · Issue #928 · actions/setup-node

No documented way to run without a lockfile #928

New issue
Copy link
New issue
Copy link
Closed
Closed
No documented way to run without a lockfile#928
Copy link
Assignees
v-mahabaleshwars
Labels
feature requestNew feature or request to improve the current logic

Description

@wesleytodd
wesleytodd
opened on Dec 20, 2023
Issue body actions

Description:

According to your docs there is no way to disable the lockfile check. They repeatedly say it is recommended to use a lockfile:

https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#working-with-lockfiles
https://github.com/actions/setup-node?tab=readme-ov-file#checking-in-lockfiles

Unless I am missing it in some other docs I don't see it mentioned anywhere. But based on the code, it looks like you can avoid this check by disabling cache. I tested removing the cache key from my config and that did in fact work.

First, I would recommend not being so forceful in your wording on these docs. There are many cases for libraries where a lockfile is not the best approach. Many bugs have been found by users because the library author did not test removing their lockfile before publishing and used outdated transitives when testing. If you like you could link to the documentation written by the Node.js Package Maintenance Working Group which outlines a bit of the tradeoffs.

Short of that, I think an addition should be made to the advanced topics about turning off cache so that you can run without a lockfile.

Reacted by Damian Bouné, Animesh, Rakesh Lanjewar, lcy, Gene Zharov, Jannis and Christian Oliff

Activity

  1. wesleytodd
    added
    bugSomething isn't working
    needs triage
    on Dec 20, 2023
  2. wesleytodd commented on Dec 20, 2023

    @wesleytodd
    wesleytodd
    on Dec 20, 2023
    Author
    More actions

    Oh, and I forgot, there is also this from the OSSF: https://github.com/ossf/package-manager-best-practices/blob/main/published/npm.md#project-types

    Maybe link out to these so folks can read documents from the experts in this space which will be updated as best practices change?

  3. nikolai-laevskii commented on Dec 21, 2023

    @nikolai-laevskii
    nikolai-laevskii
    on Dec 21, 2023
    Contributor
    More actions

    Thank you for creating the issue! We will consider it and come back with a response!

    Reacted by Wes Todd
  4. nikolai-laevskii
    added
    needs eyes
    and removed
    needs triage
    on Dec 21, 2023
  5. dmitry-shibanov commented on Dec 25, 2023

    @dmitry-shibanov
    dmitry-shibanov
    on Dec 25, 2023
    Contributor
    More actions

    Hello @wesleytodd. The action has special input cache-dependency-path and it is usage described in the documentation and advanced section. You can specify different files to generate hash from it. In general we recommend to use package-lock.json because it contains all dependency tree and if versions of some dependencies are changed the new hash will be generated and resave cache. But with cache-dependency-path you can override it to different file.

    The cache is optional input and it is not enabled by default.

  6. nikolai-laevskii
    removed
    needs eyes
    on Dec 26, 2023
  7. wesleytodd commented on Dec 28, 2023

    @wesleytodd
    wesleytodd
    on Dec 28, 2023
    Author
    More actions

    The action has special input cache-dependency-path and it is usage described in the documentation and advanced section.

    Yep! I read those. That is different than what I am mentioning here. I am recommending that the unnecessarily (see links provided above) strong recommendations around lock files be removed and that there be top level documentation around running without a lockfile.

    I am happy to open PR's for these, but wanted to start the conversation as an issue before doing that work.

  8. v-aparnajyothi-y
    assigned
    v-priyagupta108
    on Jan 1, 2024
  9. v-aparnajyothi-y
    added
    feature requestNew feature or request to improve the current logic
    and removed
    bugSomething isn't working
    on Jan 22, 2024
  10. v-aparnajyothi-y
    unassigned
    v-priyagupta108
    on Jan 22, 2024
  11. addaleax
    added 2 commits that reference this issue on Jan 14, 2025

    chore: add package-lock.json file

    ccb5d34

    chore: add package-lock.json file

    12c9fd7
  12. portalhacker
    added a commit that references this issue on Feb 19, 2025

    fix: try running Node without a lock file [documentation](actions/set…

    1410d80
  13. portalhacker
    added a commit that references this issue on Feb 27, 2025

    fix: try running Node without a lock file [documentation](actions/set…

    0f03284
  14. jdmarshall commented on Aug 10, 2025

    @jdmarshall
    jdmarshall
    on Aug 10, 2025
    More actions

    Lockfiles are pretty much required for applications. For libraries however, they tend to be anywhere on a spectrum from 'less useful' to 'obstructive'.

    You really need a monorepo as well for lockfiles to make sense. If your application is made of a bunch of modules that have separate compilation units, you've created a massive maintenance problem by including lockfiles anywhere but at the deployment level.

  15. WSH032
    added 2 commits that reference this issue on Sep 13, 2025

    fix: manually set `cache-dependency-path` for `actions/setup-node`

    5bf3611

    fix: manually set `cache-dependency-path` for `actions/setup-node`

    cd0d6c7
  16. github-merge-queue
    added a commit that references this issue on Sep 14, 2025

    ci: add template testing CI (#21)

    782f136
  17. v-aparnajyothi-y
    closed this as completedon Oct 30, 2025
  18. v-aparnajyothi-y
    reopened this on Oct 30, 2025
  19. v-mahabaleshwars
    self-assigned this
    on Dec 1, 2025
  20. v-mahabaleshwars commented on Dec 22, 2025

    @v-mahabaleshwars
    v-mahabaleshwars
    on Dec 22, 2025
    Contributor
    More actions

    Hi @wesleytodd,

    We’re closing this issue now as the pull request #1454 has been merged to resolve it.
    You can now check out the latest changes on the main branch and test with the updated functionality.

    If you have any further questions or need additional assistance, feel free to reach out. Thanks!

  21. v-mahabaleshwars
    closed this as completedon Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @v-mahabaleshwars
    v-mahabaleshwars

Labels

feature requestNew feature or request to improve the current logic

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.