Skip to content

Bug: Not using npm correctly #329

Closed

Description

@sroussey

Describe the bug

So with npm there are a couple of ways to install dependencies. When you are developing, you tend to npm i --save xxxx etc. These actions create a lock file packages-lock.json which describes everything installed and their versions, etc.

If you have no lock file, or just npm i on a fresh checkout, each person may get different dependency versions (usually something newer that is not expected to change, but might actually break things). As a dev this is a good way to be forced to keep on top of some things.

For an install of dependencies that are pinned to the exact same versions (all the way down) you use npm ci instead. In that case you end us with a deterministic install.

Currently, you do something like this npm i && npm ci which might as well be npm i && npm i.

Steps to reproduce

just run as is

Expected behavior

I think you want deterministic installs so builds don't break for unknown reasons.

The way to do this is to remove packages-lock.json from .gitignore and commit it.

Then in the github actions just run npm ci which means npm install using the lock file. You will never have npm i in build system.

USearch version

2.8

Operating System

all

Hardware architecture

x86

Which interface are you using?

Other bindings

Contact Details

No response

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added
    bug
    invalid
    on Jan 5, 2024
  2. ashvardanian commented on Jan 5, 2024

    @ashvardanian
    Member

    Agreed, @sroussey! Would you be able to submit a PR?

  3. sroussey commented on Jan 5, 2024

    @sroussey
    ContributorAuthor

    Working on it. 😁

  4. added a commit that references this issue on Jan 5, 2024
  5. added a commit that references this issue on Jan 5, 2024
  6. added a commit that references this issue on Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buginvalid

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions