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

"No loader is configured" when using glob entrypoints with a plugin-specific file extension #4009

Open
SystemParadox opened this issue Dec 19, 2024 · 1 comment

Comments

@SystemParadox
Copy link

See failing test case at https://github.com/SystemParadox/esbuild/tree/issue-plugin-glob-entrypoint.

This test works if the entrypoint is changed to in.json5, but using any kind of glob entrypoint results in:

✘ [ERROR] No loader is configured for ".json5" files
@SystemParadox SystemParadox changed the title "No loader is configured" when using glob entrypoints with plugins "No loader is configured" when using glob entrypoints with a plugin-specific file extension Jan 27, 2025
@kasir-barati
Copy link

kasir-barati commented Feb 9, 2025

Getting somewhat similar error message:

$ nx build bidirectional-grpc-file-upload --verbose

 NX   Running target build for project bidirectional-grpc-file-upload and 1 task it depends on:

———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

> nx run shared:build  [local cache]


> nx run bidirectional-grpc-file-upload:build:production

✘ [ERROR] No loader is configured for ".proto" files: apps/bidirectional-grpc-file-upload/src/assets/file.proto


 NX   Build failed with 1 error:

error: No loader is configured for ".proto" files: apps/bidirectional-grpc-file-upload/src/assets/file.proto
Error: Build failed with 1 error:
error: No loader is configured for ".proto" files: apps/bidirectional-grpc-file-upload/src/assets/file.proto
    at failureErrorWithLog (/home/kasir/projects/docker/docker-compose-files/minio/node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js:1651:15)
    at /home/kasir/projects/docker/docker-compose-files/minio/node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js:1059:25
    at /home/kasir/projects/docker/docker-compose-files/minio/node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js:1004:52
    at buildResponseToResult (/home/kasir/projects/docker/docker-compose-files/minio/node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js:1057:7)
    at /home/kasir/projects/docker/docker-compose-files/minio/node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js:1086:16
    at responseCallbacks.<computed> (/home/kasir/projects/docker/docker-compose-files/minio/node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js:704:9)
    at handleIncomingPacket (/home/kasir/projects/docker/docker-compose-files/minio/node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js:764:9)
    at Socket.readFromStdout (/home/kasir/projects/docker/docker-compose-files/minio/node_modules/.pnpm/esbuild@0.19.12/node_modules/esbuild/lib/main.js:680:7)
    at Socket.emit (node:events:524:28)
    at addChunk (node:internal/streams/readable:561:12)

I have this monorepo setup which was working until I had to switch to pnpm workspaces and now it breaks down in the middle of compilation and bundling, i.e. when I open the half-completed dist directory there is a file.proto inside the assets directory. So it copies the assets as it should.

But the weird part is the fact that I'm not importing the file.proto anywhere in my code, or at least I am not doing it directly (i.e. import fileProto from '../assets/file.proto'; or something like that). So what exactly is wrong here?

Note

I am NOT importing the file.proto directly but I am passing it's path to loadSync here. Not sure if that matters though 😅.

Repo for reproducing this issue: https://github.com/kasir-barati/docker/tree/main/docker-compose-files/minio

@SystemParadox What did you do to solve you're issue?

@evanw @rtsao @magic-akari could you please confirm if this issue is related to esbuild or if it is something entirely different, and if it is can you please give me some pointers to find the cause of this issue and solve it (asking since the logs are all only about esbuild and I am not sure what's happening there 🙂)?

Thanks in advance ❤💮.

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

2 participants