Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elm-pages run script/src/AddRoute.elm fails when run before first build #430

Open
adamdicarlo opened this issue Oct 31, 2023 · 4 comments
Open

Comments

@adamdicarlo
Copy link

I'm using Elm Pages v3.0.9.

This is easy to reproduce with this command:

$ npx elm-pages init my-site && cd my-site && npx elm-pages run script/src/AddRoute.elm AboutThisSite

The output I get is:

Creating my-site project...
Project is successfully created in `/home/adam/src/my-site`.
Trace
    at Command.<anonymous> (file:///home/adam/.npm/_npx/f522c3e74dfcf71b/node_modules/elm-pages/generator/src/cli.js:168:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

If I run npx elm-pages build, I can then run the elm-pages run ... command successfully.

@dillonkearns
Copy link
Owner

I'm not able to reproduce that one:

---mbp:~srctmpmy-site 2023-11-03 at 11 45 52 AM

@adamdicarlo0
Copy link
Contributor

Thanks for taking a look. I think this might be due to missing tools, because I'm running without almost anything globally installed. If that's the case, the bug is that there's no error message (it's an empty string). I'm digging in a bit to see what's happening.

Do you have lamdera, elm-review, and other tools that an elm-pages build uses installed globally?

@dillonkearns
Copy link
Owner

Gotcha, that would probably explain it! I might not have those checks for running scripts, I do have them for the build and dev server I think. Thanks for the context!

@dillonkearns
Copy link
Owner

And yes, I do have those tools installed globally on my PATH.

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

No branches or pull requests

3 participants