Skip to content

main field in package.json incorrectly pointing to non-existent eoc file, causing require failures #1173

Open

Description

@morphqdd

What happens

package.json declares "main": "eoc", but there is no eoc.js or eoc/ directory at the repo root - the actual entry point lives at src/eoc.js and is correctly declared under "bin". Requiring the package as a library fails:

$ node -e "require('.')"
Error: Cannot find module '.../eoc'. Please verify that the package.json has a
valid "main" entry

This is harmless for normal CLI usage (npx eolang / the installed eoc binary both go through bin, not main), but breaks for anything that does require('eolang') from another Node package.

What should happen

"main" should either point at the real entry file (src/eoc.js) or be removed if the package isn't meant to be required as a library.

Activity

  1. morphqdd commented on Aug 13, 2026

    @morphqdd
    ContributorAuthor

    @yegor256, please take a look when you have a moment.

  2. added a commit that references this issue on Aug 31, 2026
  3. changed the title [-]`package.json`'s `main` field points at a nonexistent `eoc` file[/-] [+]`main` field in `package.json` incorrectly pointing to non-existent `eoc` file, causing require failures[/+] on Aug 31, 2026
  4. added a commit that references this issue on Aug 31, 2026
  5. 0crat commented on Sep 2, 2026

    @0crat

    @morphqdd Thanks for reporting a new bug! You've earned +12 points. By reporting bugs, you help our project improve its quality. If you find anything else in the repository that doesn't look as good as you might expect, do not hesitate to report it. Your running score is +6567; don't forget to check your Zerocracy account too).

  6. added 2 commits that reference this issue on Sep 5, 2026
  7. yegor256 commented on Nov 6, 2026

    @yegor256
    Member

    The package still declares a nonexistent main entry. The proposed removal keeps the existing CLI entry; pointing main at src/eoc.js would execute CLI parsing during require(). Next step: review #1212. Current code: package.json:50.

  8. added 2 commits that reference this issue on Nov 7, 2026
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions