evancz / url-parser

Parse URLs into nicely structured data
http://package.elm-lang.org/packages/evancz/url-parser/latest/
BSD 3-Clause "New" or "Revised" License
114 stars 29 forks source link

Compile error about package constraints #44

Closed mccrodp closed 7 years ago

mccrodp commented 7 years ago

Hi, I'm trying to use this package, but the example elm only allows the loading of the route via link click rather than loading the url directly. Is this what is meant by managing browser navigation manually?

I tried to integrate it with this package: https://github.com/mathieul/brunch-with-elm-bootstrap I simply cloned that repo: git clone https://github.com/mathieul/brunch-with-elm-bootstrap.git and then ran elm-package install evancz/url-parser.

When I run : brunch watch --server I get the below error. Any ideas? Thanks

Error: ENOENT: no such file or directory, stat '/Users/paulmccrodden/dev/brunch-with-elm-bootstrap/public/index.html'
    at Error (native)

11:34:25 - error: Compiling of app/elm/Main.elm failed. Error: Command failed: elm-make --yes --debug --output public/js/main.js app/elm/Main.elm
   Problem in dependency evancz/url-parser 2.0.1

   The elm-package.json constraints of 'evancz/url-parser' are probably
   letting too much stuff through. Definitely open an issue on the relevant github
   repo to get this fixed and save other people from this pain.

   In the meantime, take a look through the direct dependencies of the broken
   package and see if any of them have had releases recently. If you find the new
   thing that is causing problems, you can artificially constrain things by adding
   some extra constraints to your elm-package.json as a stopgap measure.
process-bot commented 7 years ago

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

evancz commented 7 years ago

Based on the info here, there are too many things outside of this library that could be going wrong to give any definitive advice.

I recommend working through it on the Elm slack. There are a bunch of folks who are friendly and happy to help out! http://elmlang.herokuapp.com/

mccrodp commented 7 years ago

Never had that much use from Elm Slack to be honest on a few different channels, fairly new to Elm. Just not enough examples out there to get a sense of things, not even sure if this module does anything outside of url parsing. I'm not sure if it works on it's own e.g. - if I access /about from a link on the home route v.s. loading /about directly. The latter gives a 404 for me so far using a modified version of the example app.

If I could get an answer on that, that would be all that I need really. Can this library do this alone, or do I need to combine with some other libs, Navigation etc.? Is there an example for this, where directly loaded routes are routed using this lib? Thank you!

mccrodp commented 7 years ago

I posted this on the Elm #routing Slack as a last ditch attempt to fix this. Fingers crossed. https://elmlang.slack.com/archives/C0K5BSF36/p1501831692650467