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

panic: interface conversion on v0.10.1 #1064

Closed
pheuter opened this issue Mar 26, 2021 · 2 comments
Closed

panic: interface conversion on v0.10.1 #1064

pheuter opened this issue Mar 26, 2021 · 2 comments

Comments

@pheuter
Copy link

pheuter commented Mar 26, 2021

Works perfectly fine on v0.10.0.

panic: interface conversion: bundler.fileRepr is *bundler.reprCSS, not *bundler.reprJS

goroutine 97 [running]:
github.com/evanw/esbuild/internal/bundler.(*linkerContext).computeCrossChunkDependencies.func1(0x14000cfac00, 0x6, 0x6, 0x14000188900, 0x14000740000, 0x6, 0xa, 0x1400072c370, 0x0, 0x140003029d8, ...)
	/Users/evan/dev/esbuild/internal/bundler/linker.go:1027 +0x760
created by github.com/evanw/esbuild/internal/bundler.(*linkerContext).computeCrossChunkDependencies
	/Users/evan/dev/esbuild/internal/bundler/linker.go:943 +0x194
app/node_modules/esbuild/lib/main.js:1036
              return callback(new Error(error), null);
                              ^

Error: The service was stopped
    at app/node_modules/esbuild/lib/main.js:1036:31
    at app/node_modules/esbuild/lib/main.js:576:9
    at Socket.afterClose (app/node_modules/esbuild/lib/main.js:554:7)
    at Socket.emit (node:events:381:22)
    at endReadableNT (node:internal/streams/readable:1307:12)
    at processTicksAndRejections (node:internal/process/task_queues:81:21)
@pheuter pheuter changed the title Panic on v0.10.1 panic: interface conversion on v0.10.1 Mar 26, 2021
@evanw
Copy link
Owner

evanw commented Mar 26, 2021

Thanks for the report. I can reproduce this given the information in the stack trace. It looks like this only happens when code splitting is active and there is a CSS entry point as well as two or more JavaScript entry points. I don't believe CSS bundling works well (or at all) in this scenario, which is something to be aware of (#608). So hopefully this scenario isn't too common. I'm aware of the issues and am working on fixing them. Regardless, esbuild obviously shouldn't crash. I'll fix this crash in the next release.

@evanw evanw closed this as completed in e6dbfe0 Mar 26, 2021
@pheuter
Copy link
Author

pheuter commented Mar 26, 2021

Yep, makes sense, have a CSS entrypoint and multiple js entry points (building React widgets designed to be embedded on a third-party website).

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.

2 participants