Skip to content

Commit c77bb16

Browse files
committed
Skip axios installation
1 parent 87bc0f0 commit c77bb16

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Commands/InstallCommand.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ private function importDependenciesFromNpm(): void
8383

8484
$dependencies = collect(array_replace($packageJson['dependencies'] ?? [], $packageJson['devDependencies'] ?? []))
8585
->filter(fn ($_version, $package) => ! in_array($package, $filteredOutDependencies))
86+
->filter(function ($_version, $package) {
87+
if ($package !== 'axios') {
88+
return true;
89+
}
90+
91+
$this->output->warning('It seems you are using axios. Axios is not compatible with importmaps, so we are skipping its installation.');
92+
93+
return false;
94+
})
8695
// Axios has an issue with importmaps, so we'll hardcode the version for now...
8796
->map(fn ($version, $package) => $package === 'axios' ? 'axios@0.27' : "\"{$package}@{$version}\"");
8897

0 commit comments

Comments
 (0)