missing dependencies?
Closed this issue · 2 comments
In Laravel 9.48 I've composer required
Laravel Data and then this typescript-transformer package.
When I run php artisan typescript:transform
it complaints about several missing dependencies, related to nesbot/carbon package:
Interface "PHPStan\Reflection\MethodsClassReflectionExtension" not found at vendor/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php:27
Class "Doctrine\DBAL\Types\VarDateTimeType" not found at vendor/nesbot/carbon/src/Carbon/Doctrine/DateTimeType.php:12
I have mostly been doing node/NPM and my expectation would be that these dependencies were handled automatically with composer, like in npm, but maybe I'm wrong.
I apologize if this is not really an issue with typescript-transformer.
I don't think this has anything to do with TypeScript transformer since we're not relying on those dependencies. Are you able to run any other artisan commands?
You are right, nothing to do with typescript-transformer per se.
It came down to a misspecification of the app_path. In /config/typescript-transformer.php
I had hardcoded the app path to '../src'
(which was wrong)
'auto_discover_types' => [
// app_path()
'../src'
],
It somehow send typescript-transformer on a wild-goose hunt, trying to typescript transform files in the vendor
directory, complaining about missing packages here and there.
Got it fixed. Thanks. Closing issue.