`fastly compute serve` option `--file` is not used
Closed this issue · 2 comments
Version
Fastly CLI version v9.0.3 (f6047d9)
Built with go version go1.20.3 linux/amd64
Viceroy version: viceroy 0.4.5
What happened
fastly compute serve --file=./dist/main.wasm
should work and use the file ./dist/main.wasm
instead it ends in error: ERROR: stat ./bin/main.wasm: no such file or directory.
👋🏻 Hi @roptch
Thanks for opening this issue but I'm unfortunately not able to replicate your issue 🤔
I spun up a new project using fastly compute init
then ran a fastly compute build
and manually copied the bin/main.wasm
into a new directory (e.g. dist/main.wasm
) and setting --file
on the fastly compute serve
command didn't error at all...
I even deleted the bin/main.wasm
in case that was being picked up by the serve command regardless of the --file
flag and still it was able to serve the dist/main.wasm
.
Are you able to review the Fastly CLI error log to see if it provides any more context around the error?
For example, the following command should print the contents of the error log (most recent errors reported at the bottom of the file)...
cat "$(fastly config -l | tail -n 1 | xargs -I % dirname %)/errors.log"
Thanks.
I'm going to close out this issue for the moment. Feel free to continue the discussion if you're still having problems.
Thanks.