Tiffany
Tiffany

Reputation: 707

Vendor folder does not exist and cannot be created

Question:

What kind of permissions should I give to Composer on Windows?

Server information:

Error message:

[RuntimeException]

C:\inetpub\wwwroot/vendor does not exist and could not be created.

Steps that I've tried and thoughts:

I've installed Composer through the .exe file.

I have a composer.json file in C:\inetpub\wwwroot and when I try running composer install or composer update, I get the error message.

I've tried manually creating the vendor folder in the directory, but then it cannot download the package that I have in my composer.json file, giving roughly the same error message, that the package doesn't exist and could not be created.

I've googled the error, and I'm led to believe it's a permissions issue, however, I have installed Composer on another server and installed packages in the C:\inetpub\wwwroot directory without a problem. I've tried comparing security group permissions between the two servers for wwwroot and inetpub, and the permissions were the same. I had someone suggest trying to copy the .json file to My Documents on the server and try running composer install from there, and that worked. Which further indicates it's a permissions issue, but I can't figure out what.

Upvotes: 6

Views: 16074

Answers (2)

Bala
Bala

Reputation: 648

Please ensure that whether your deployment folder is having composer.lock file or not.' If not please deploy the file there.

Upvotes: 1

Tiffany
Tiffany

Reputation: 707

After re-reading another Linux question, I figured out what the problem was. I need to be running Command Prompt as administrator. Now it works.

Upvotes: 8

Related Questions