XF 2.0 XF2 creating addon via CLI and I continue to get "no Such file or directory"

Chris D

XenForo developer
Staff member
#2
It likely suggests that the src/addons directory is not writeable by whichever user the command is running as.

Are you developing on a remote server or a local server (e.g. WAMP or similar?)
 

Dannymh

Active member
#3
It likely suggests that the src/addons directory is not writeable by whichever user the command is running as.

Are you developing on a remote server or a local server (e.g. WAMP or similar?)
Developing locally with bitnami installed on mac, directory has full Read and Write access
 

Mike

XenForo developer
Staff member
#4
If you add --verbose when you run the command, it should give a full backtrace. (Alternatively, there's probably one logged in the control panel.)
 

Dannymh

Active member
#5
If you add --verbose when you run the command, it should give a full backtrace. (Alternatively, there's probably one logged in the control panel.)
Verbose isnt giving me any more cluse

Code:
dmba2:XF2 dmba$ php cmd.php xf-addon:create --verbose
Enter an ID for this add-on: Silvertails/demo
No such file or directory
Enter an ID for this add-on:
Also nothing is going into the admin logs either
 

Dannymh

Active member
#6
i'll run it up on my linux machine later and see if I can get it working, however would prefer it working on the mac as its my main and travel computer
 

Chris D

XenForo developer
Staff member
#7
Certainly should work on a Mac.

I'm actually quite confused because there really shouldn't be anything happening between answering that question and the next question.

The only thing we do is check if the add-on files already exist, but even then we would return a sensible error.


Just to check - are you running Beta 7?
 

Mike

XenForo developer
Staff member
#8
This is quite possibly DB related and your CLI PHP is looking for the DB connection socket at a different location than your web server. If you change your src/config.php to 127.0.0.1 instead of localhost and that fixes it, that's the cause.
 

Dannymh

Active member
#9
This is quite possibly DB related and your CLI PHP is looking for the DB connection socket at a different location than your web server. If you change your src/config.php to 127.0.0.1 instead of localhost and that fixes it, that's the cause.
Winner that fixed it thank you!
 

mcatze

Well-known member
#10
I had the same problem. The folders are writeable and also change localhost to 127.0.0.1 changes nothing.

I use Mamp Pro 4.2.1 on a Mac and got the following errors if i want to create an add-on.

Code:
Matthiass-Mini:xen2 McAtze$ php cmd.php xf-addon:create --verbose
Enter an ID for this add-on: ITM/Cookies
 Connection refused
Enter an ID for this add-on:
 

ALMUSA

Well-known member
#13
Im having the same issue No such file or directory and when I changed conf.php from localhost to 127.0.0.1 I get connection refused.
 
#14
Same issue. The tutorial listed here doesn't work on MAMP / Mac.

Changed the config file to have 127.0.0.1 and it still doesn't work.

Screen Shot 2018-04-11 at 9.10.40 PM.png

Any further suggestions on getting the tutorial to work as detailed?
 
#17
Doesn't look like you've connected to your ScotchBox. Go to the base directory and enter vagrant ssh. This should connect you to your vagrant box. Go to the xenforo directory, probably somewhere in /var/www/, and run the command from there.
 
Top