Skip to content

fix(nmr-cli): build as ESM to restore nmr-processing exports - #150

Merged
vcnainala merged 1 commit into
developmentfrom
build-nmr-cli-ESM
Oct 1, 2026
Merged

vcnainala merged 1 commit into
developmentfrom
build-nmr-cli-ESM

Conversation

@hamed-musallam

Copy link
Copy Markdown
Collaborator

nmr-processing v22 is ESM-only, but the CLI compiled to CommonJS. Under require() only a handful of its exports resolved, so mapPeaks was undefined and parse-spectra failed with "(0, nmr_processing_1.mapPeaks) is not a function".

  • set "type": "module" so tsc emits ESM under NodeNext
  • add explicit .js extensions to all relative imports
  • copy package-lock.json and use npm ci in the Docker build for reproducible dependency resolution

nmr-processing v22 is ESM-only, but the CLI compiled to CommonJS. Under
require() only a handful of its exports resolved, so mapPeaks was undefined
and parse-spectra failed with "(0, nmr_processing_1.mapPeaks) is not a
function".

- set "type": "module" so tsc emits ESM under NodeNext
- add explicit .js extensions to all relative imports
- copy package-lock.json and use npm ci in the Docker build for
  reproducible dependency resolution
@vcnainala
vcnainala merged commit 2f3b11f into development Oct 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants