injectable icon indicating copy to clipboard operation
injectable copied to clipboard

Error when reading 'asset:' does not exist

Open JoepHeijnen opened this issue 2 years ago • 0 comments

We are trying to generate a test dependency from the test directory. Which results in the following error.

Error: Error when reading 'asset:demo/test/services/auth/oauth_mock.service.dart': File asset:demo/test/services/auth/oauth_mock.service.dart does not exist. import 'asset:demo/test/services/auth/oauth_mock.service.dart' as _i13;

This is our configuration.

@InjectableInit(generateForDir: ['lib', 'test'])
GetIt configureDependencies(String? environment) => $initGetIt(getIt, environment: environment);

We noticed that it does work when we move the test dependencies inside the lib directory.

JoepHeijnen avatar Jun 30 '22 14:06 JoepHeijnen