stargatesg1's avatar

lumen new generates errors

When running the following lumen new myapp it generates the following error

[ErrorException]
  copy(/Users/kev/.composer/cache/files/symfony/translation/75fd13ef
  af4faa967e42f12e2b942e2f14155a29.zip): failed to open stream: Permission
   denied
0 likes
11 replies
bobbybouwmann's avatar

It seems there is a problem in your vendors directory. You can run composer clear-cache and otherwise just delete the vendor directory and run composer install again

stargatesg1's avatar

This happens when i am creating a brand new project by running lumen new

Nakov's avatar

@stargatesg1 what version of the lumen installer are you running? try updating the installer using composer update laravel/lumen-installer.

I just installed new lumen project yesterday haven't had any issues with 1.1.0 version of the installer.

stargatesg1's avatar

I did but I got this error

composer update laravel/lumen-installer Composer could not find a composer.json file in /Users/user To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section

Nakov's avatar
Nakov
Best Answer
Level 73

@stargatesg1 Sorry you need to reference the global as it is not project specific.

composer global update "laravel/lumen-installer"

stargatesg1's avatar

I am using brew to install composer its all up to date :)

Nakov's avatar

@stargatesg1 didn't asked you to update composer but the lumen-installer so that should be the latest version. However you have permission issues from your composer so you need to check what is the user that owns your composer installation, or try using sudo.

Nakov's avatar

@stargatesg1 that's probably because you installed composer using sudo. So please mark my answer as the solution :) happy coding

stargatesg1's avatar

But I didn't install composer using sudo. I did using brew.

Nakov's avatar

@stargatesg1 you probably ran: sudo brew install composer. You can check who owns your composer installation ls -l ~/.composer it will tell you the owner of each directory and file there. So the cache is owned by the root, hence the error.

Please or to participate in this conversation.