Builder error: Unable to locate required sdk resource build_web_compilers
Description
I get this error when trying to jaspr serve my application.
$ ~/dev/minimanage jaspr serve
[CLI] Running jaspr in server rendering mode.
[BUILDER] [ERROR] Bad state: Unable to locate required sdk resource build_web_compilers|lib/src/dev_compiler/dart_sdk.js
Steps To Reproduce
- go into the terminal and clone the github repository of my project:
git clone https://github.com/Yoeri-z/minimanage.git minimanage
- go into the project:
cd minimanage
- run jaspr serve
jaspr serve
The error should be consistently reproducible like this
Doctor Output
[✓] Jaspr CLI (Version 0.17.0)
• Dart Version 3.6.1 (stable) (Tue Jan 7 09:50:00 2025 -0800) on "linux_x64" at /home/yoeri/snap/flutter/common/flutter/bin/cat
• Running on linux Linux 5.15.0-130-generic #140-Ubuntu SMP Wed Dec 18 17:59:53 UTC 2024 - Locale en_US.UTF-8
• Analytics: Enabled
[✓] Current Project
• Dependencies on core packages:
• jaspr: ^0.17.0
• jaspr_builder: ^0.17.0 (dev)
• jaspr_router: ^0.6.1
• Rendering mode: server
• Uses jaspr compilers: false
• Uses flutter embedding: false
Expected Behavior
I expect the jaspr builder to not crash
Additional Context I am using drift alongside jasper so there are two packages using build_runner, this shouldnt be an issue but i dont know what else could be causing it
Can you try setting up a pure dart web project WITHOUT jaspr and see if the error is also there? Because this looks like its coming from build_web_compilers and not jaspr
Can you try setting up a pure dart web project WITHOUT jaspr and see if the error is also there? Because this looks like its coming from build_web_compilers and not jaspr
The default jaspr project works but after i make some changes this starts happening and it seems to be irreversible. (If I remove any changes I made the issue stays). Its been really hard to pinpoint what step exactly causes it I'll keep trying though. The interesting thing is that the issue is replicable so it isn't something with my dart installation.
I can try setting up a pure dart web application but I don't know how to do that yet so will take me some time.
Hi ! To add my experience for this problem.
With jaspr_web_builder I do not have crash :
dev_dependencies:
build_runner: ^2.4.0
jaspr_web_compilers: ^4.1.0
# build_web_compilers: ^4.1.0
jaspr_builder: ^0.17.0
Although, if I comment jaspr_web_compilers and let build_web_compilers, it crashes with the same error :
[BUILDER] [ERROR] Bad state: Unable to locate required sdk resource build_web_compilers|lib/src/dev_compiler/dart_sdk.js