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

examples/sample-program with preview mode doesn't start up #6

Open
t2y opened this issue Nov 16, 2023 · 3 comments
Open

examples/sample-program with preview mode doesn't start up #6

t2y opened this issue Nov 16, 2023 · 3 comments

Comments

@t2y
Copy link

t2y commented Nov 16, 2023

I can run with dev mode, but I cannot run with preview (production) mode. Is there any workaround?

$ make preview 
...
building go binary...
run test_program
2023/11/16 11:31:37 open dist/manifest.json: file does not exist
make: *** [Makefile:58: preview] Error 1

But it seems the manifest.json exists.

$ ls -l ./dist/manifest.json 
-rw-rw-r-- 1 t2y t2y 412 Nov 16 11:31 ./dist/manifest.json

I tried to run it manually, but it failed.

$ ./test_program -env production -assets ./dist/assets -dist ./dist 
2023/11/16 11:33:22 open ./dist/manifest.json: file does not exist
@t2y
Copy link
Author

t2y commented Nov 17, 2023

I should have specified frontend as an assets directory, but it still failed.

$ go run main.go -env production -assets ./frontend -dist ./dist

@t2y
Copy link
Author

t2y commented Nov 17, 2023

The frontend directory also should have a dist directory?

@t2y
Copy link
Author

t2y commented Nov 17, 2023

This is a workaround that works for me.

$ make preview
...
2023/11/17 13:29:11 open dist/manifest.json: file does not exist
make: *** [Makefile:58: preview] Error 1
$ cp -ar dist/ frontend/
$ make preview

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

1 participant