aloisdeniel/dioc

pub run build_runner build doesn't work.

Closed this issue · 3 comments

When I try running this command all I get is

Could not find a file named "pubspec.yaml" in "C:\Users\eagle\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\shelf_static-0.2.8".

Also this doesn't seem like an ideal way to do DI to have a prebuild step.

You should probably run the command from the root of your project, the path seems weird.

Also this doesn't seem like an ideal way to do DI to have a prebuild step.

You are not forced to, you can use the dioc package alone if you prefer to.

But I'm curious : why do you think this ? You saw limits from using this approach ?

Got the same issue here.
It seems that the command looks for some pre-cached dependencies (not sure why) like shelf_static, built_value, web_socket_channel, in the .pub-cache folder, but I didn't even have a .pub-cache.
Running pub cache add [dependency] seems to resolve the issue for a specific dependency, moving on to the next error, but not knowing how many times I would have to run this command, I will stick to the dioc package until this is resolved.

Nevermind, running flutter packages pub run build_runner build lib before the pub run build_runner build did the trick.