Skip to content

fix: NodeJS ERR_MODULE_NOT_FOUND #59

Open
yuit wants to merge 3 commits intoUniversal-Commerce-Protocol:mainfrom
yuit:NodeJS_FixModuleNotFound
Open

fix: NodeJS ERR_MODULE_NOT_FOUND #59
yuit wants to merge 3 commits intoUniversal-Commerce-Protocol:mainfrom
yuit:NodeJS_FixModuleNotFound

Conversation

@yuit
Copy link

@yuit yuit commented Mar 9, 2026

Description

Fix NodeJS ERR_MODULE_NOT_FOUND when run nodejs server in production by

  • Add .js file extensions
  • import with index.js instead of directory import
  • Use type-only import statement to prevent TypeScript compile from emitting blank import statement

Before the change
Screenshot 2026-03-09 at 2 21 06 PM
Screenshot 2026-03-09 at 11 45 27 AM

After the change
Screenshot 2026-03-09 at 2 09 58 PM
Screenshot 2026-03-09 at 2 22 55 PM

Category (Required)

Please select one or more categories that apply to this change.

  • Core Protocol: Changes to the base communication layer, global context, or breaking refactors. (Requires Technical Council approval)
  • Governance/Contributing: Updates to GOVERNANCE.md, CONTRIBUTING.md, or CODEOWNERS. (Requires Governance Council approval)
  • Capability: New schemas (Discovery, Cart, etc.) or extensions. (Requires Maintainer approval)
  • Documentation: Updates to README, or documentations regarding schema or capabilities. (Requires Maintainer approval)
  • Infrastructure: CI/CD, Linters, or build scripts. (Requires DevOps Maintainer approval)
  • Maintenance: Version bumps, lockfile updates, or minor bug fixes. (Requires DevOps Maintainer approval)
  • SDK: Language-specific SDK updates and releases. (Requires DevOps Maintainer approval)
  • Samples / Conformance: Maintaining samples and the conformance suite. (Requires Maintainer approval)
  • UCP Schema: Changes to the ucp-schema tool (resolver, linter, validator). (Requires Maintainer approval)
  • Community Health (.github): Updates to templates, workflows, or org-level configs. (Requires DevOps Maintainer approval)

Related Issues

Fix issue #58

Checklist

  • I have followed the Contributing Guide.
  • I have updated the documentation (if applicable).
  • My changes pass all local linting and formatting checks.
  • (For Core/Capability) I have included/updated the relevant JSON schemas.
  • I have regenerated Python Pydantic models by running generate_models.sh under python_sdk.

Screenshots / Logs (if applicable)

@yuit yuit requested review from a team as code owners March 9, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant