Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Install codegen/helpers/LocalFile.elm fails on run

Open
#41 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
nodejs
Domain
cli

Research direction

Start with elm-codegen run in the linked SSCCE project and inspect the copyHelpers path reported in dist/run.js. Reproduce the ENOENT for generated/codegen/helpers/LocalFile.elm; done means the installed nested helper is available there and elm-codegen run completes without the error.

Written by the indexing model from the issue text.

Description

Overview

Installing a local file inside of a directory fails when run is called.

This follows the pattern in the install help guide:

image

SSCCE project: https://github.com/absynce/elm-codegen-local-import-error.

Expected behavior

elm-codegen install codegen/helpers/LocalFile.elm creates helper. Then it runs with elm-codegen run.

Actual behavior

elm-codegen install codegen/helpers/LocalFile.elm creates helper. Then it errors with elm-codegen run.

To reproduce inside SSCCE project

elm-codegen run

Error

Error: ENOENT: no such file or directory, open 'generated/codegen/helpers/LocalFile.elm'
Full stacktrace
node:fs:585
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open 'generated/codegen/helpers/LocalFile.elm'
    at Object.openSync (node:fs:585:3)
    at Object.writeFileSync (node:fs:2155:35)
    at _loop_1 (/Users/absynce/.npm/_npx/be14e040090c2b5c/node_modules/elm-codegen/dist/run.js:521:16)
    at copyHelpers (/Users/absynce/.npm/_npx/be14e040090c2b5c/node_modules/elm-codegen/dist/run.js:540:9)
    at Command.<anonymous> (/Users/absynce/.npm/_npx/be14e040090c2b5c/node_modules/elm-codegen/dist/run.js:706:13)
    at step (/Users/absynce/.npm/_npx/be14e040090c2b5c/node_modules/elm-codegen/dist/run.js:71:23)
    at Object.next (/Users/absynce/.npm/_npx/be14e040090c2b5c/node_modules/elm-codegen/dist/run.js:52:53)
    at /Users/absynce/.npm/_npx/be14e040090c2b5c/node_modules/elm-codegen/dist/run.js:46:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/absynce/.npm/_npx/be14e040090c2b5c/node_modules/elm-codegen/dist/run.js:42:12) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'generated/codegen/helpers/LocalFile.elm'
}

System info:

node -v
v16.14.0

elm-codegen -V
0.1.0
Dominant language
Elm
Stars
144
Forks
18
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mdgriffith/elm-codegen

All issues in mdgriffith/elm-codegen

Similar issues

More CLI issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.