Skip to content

parse-spectra fails to process every spectrum: nmr_processing_1.mapPeaks is not a function #139

Closed

Description

@MuhammadAbeerAkmal

Describe the bug
parse-spectra fails to process every spectrum it loads. The failure happens regardless of which flags are passed even a bare call with just -u and it fails silently, since errors during this step currently are not surfaced anywhere in the command's output.

To Reproduce
Run nmr-cli parse-spectra -u https://cheminfo.github.io/bruker-data-test/data/zipped/aspirin-1h.zip
Inspect the logs array in the JSON output
See an error entry: "Failed to parse spectrum: ... (0, nmr_processing_1.mapPeaks) is not a function"

Expected behavior
The spectrum should parse successfully with no error logged, matching normal parse-spectra behavior.

Screenshots
Node: nmr-cli's nmr-processing dependency resolves to 22.23.0
Relevant packages: @zakodium/nmrium-core-plugins requires nmr-processing: ^22.13.0, but 22.23.0 (which satisfies that range) no longer exports mapPeaks, which initiateDatum1D/ initiateDatum2D` call unconditionally on every spectrum

Additional context
Root cause is a dependency version mismatch, not something specific to this one test file. Reproduces with a completely unmodified install (verified with a fresh clean-room npm install + rebuild).

Activity

  1. MuhammadAbeerAkmal commented on Aug 31, 2026

    @MuhammadAbeerAkmal
    ContributorAuthor

    @vcnainala Could you please double check it?

  2. vcnainala commented on Sep 24, 2026

    @vcnainala
    Member

    @hamed-musallam any update on this ??

  3. hamed-musallam commented on Sep 25, 2026

    @hamed-musallam
    Collaborator

    @vcnainala

    This issue should no longer exist, as we resolved it more than three weeks ago in the development branch. I’m not sure whether the fix has been deployed to production yet, but I’m sure that it has been resolved in the development branch.

    I built the Docker image locally and ran nmr-cli with it, and everything works as expected.

  4. vcnainala commented on Sep 25, 2026

    @vcnainala
    Member

    @NishaSharma14 can you check the production deployment action in this case and see whats failing? Thank you.

  5. NishaSharma14 commented on Sep 29, 2026

    @NishaSharma14
    Contributor

    @MuhammadAbeerAkmal, could you please check this once again? I have made a release and deployed the latest changes to production just now.

  6. MuhammadAbeerAkmal commented on Oct 1, 2026

    @MuhammadAbeerAkmal
    ContributorAuthor

    @NishaSharma14 Confirmed fixed on development after #150 merged. I ran a clean install/build and tested parse-spectra / correlation against real Bruker FT data. Previously it failed every time with (0 , nmr_processing_1.mapPeaks) is not a function; now parsing, processing, and peak detection all succeed, with real detected peaks/ranges in the output.
    @hamed-musallam Thanks for the fix :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions