thomashoneyman / purescript-halogen-realworld

Exemplary real world application built with PureScript + Halogen
https://thomashoneyman.com/guides/real-world-halogen
MIT License
792 stars 86 forks source link

`npm run serve` fails #125

Closed pete-murphy closed 9 months ago

pete-murphy commented 9 months ago

I cloned this repository and followed the steps in the README, specifically

After those, npm run serve fails with

✘ [ERROR] Cannot serve an entry point without an output path

That seems to be hitting this path in esbuild https://github.com/evanw/esbuild/blob/a652e730ff07b9081470ef6965f3d54daa7b2aab/pkg/api/serve_other.go#L726

If I add --outfile=dist/index.js to the "serve" script in package.json that seems to fix things.

-  "serve": "spago build && esbuild --bundle index.js --servedir=dist",
+  "serve": "spago build && esbuild --bundle index.js --outfile=dist/index.js --servedir=dist",

I can make a PR with that change if it makes sense.

thomashoneyman commented 9 months ago

I just updated the dev dependencies significantly so I likely introduced this bug then. I would love a PR, thanks!