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

Specifying a port in jco serve errors #570

Closed
rajsite opened this issue Feb 19, 2025 · 0 comments · Fixed by #572
Closed

Specifying a port in jco serve errors #570

rajsite opened this issue Feb 19, 2025 · 0 comments · Fixed by #572

Comments

@rajsite
Copy link

rajsite commented Feb 19, 2025

Running jco serve with a custom port, i.e. jco serve --port 8010 build/example_s.wasm

Fails with error:

 jco serve --port "8010" --jco-dir build-jco build/example_s.wasm

file:///home/rajsite/dev/mraj-sle-api-proxy/example-app/build-jco/_run.js:12
    console.error(`Server listening on ${port}...`);
                                         ^

ReferenceError: port is not defined
    at file:///home/rajsite/dev/mraj-sle-api-proxy/example-app/build-jco/_run.js:12:42

Looks like the serve script accidentally escapes the port in the template string so it is emitted as a variable reference instead of replaced:

console.error(\`Server listening on \${port}...\`);

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

Successfully merging a pull request may close this issue.

1 participant