statamic / ssg

The official Statamic Static Site Generator
234 stars 24 forks source link

Install errors and "There are no commands defined in the "ssg" namespace" #36

Closed DrTrills closed 3 years ago

DrTrills commented 3 years ago

composer require statamic/ssg

Using version ^0.2.0 for statamic/ssg ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52

php please ssg:generate

There are no commands defined in the "ssg" namespace.

On another site, I got the same but ran the ssg:generate command again and it ran with no problem

duncanmcclean commented 3 years ago

It looks like Composer is running out of memory when trying to install the ssg package, which will be why the command can't be found.

I've written a little short tutorial on how to get round that...

DrTrills commented 3 years ago

Thanks @damcclean

intrepidws commented 3 years ago

@duncanmcclean Any chance this post still exists somewhere? The link doesn't work.

duncanmcclean commented 3 years ago

@duncanmcclean Any chance this post still exists somewhere? The link doesn't work.

It's no longer needed - update to Composer 2 and it should work fine.