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

watch: when esbuild fails causes estrella to crash in certain circumstances #22

Closed
rsms opened this issue Dec 19, 2020 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@rsms
Copy link
Owner

rsms commented Dec 19, 2020

Repro:

main.js:

import { nonexisting } from "./lib"
console.log(nonexisting)

lib.js

export const a = 1

Run estrella:

$ estrella -bundle -o=out.js main.js
 > main.js: error: No matching export for import "nonexisting"
    1 │ import { nonexisting } from "./lib"~~~~~~~~~~~

../../dist/estrella.g.js: TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at refreshFiles (/Users/rsms/src/src/watch/watch.ts:62:29)
    at Object.watchFiles (/Users/rsms/src/src/watch/watch.ts:106:3)
    at build1 (/Users/rsms/src/src/estrella.js:769:23)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

This happens because esbuild doesn't produce a valid (i.e. what estrella expects) metadata file when the build fails.

@rsms rsms self-assigned this Dec 19, 2020
@rsms rsms added the bug Something isn't working label Dec 19, 2020
@rsms rsms closed this as completed in 84bd679 Dec 19, 2020
@rsms
Copy link
Owner Author

rsms commented Dec 19, 2020

Published in v1.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant