Failed to purge the temporary install directory - ddev

I'm getting an error when running ddev composer create drupal-composer/drupal-project:8.x-dev --stability dev --no-interaction
...
Removing temporary install directory
Failed to purge the temporary install directory /Users/.../my-drupal8-site/.tmp_ddev_composer_create_VjDray: open /Users/.../my-drupal8-site/.tmp_ddev_composer_create_VjDray: no such file or directory
Full log
Config file
Mac OS 10.11.6
ddev version
bgsync drud/ddev-bgsync:v1.6.0
cli v1.6.0
commit v1.6.0
db drud/ddev-dbserver:v1.6.0-10.2
dba drud/phpmyadmin:v1.6.0
ddev-ssh-agent drud/ddev-ssh-agent:v1.6.0
docker 18.06.1-ce
docker-compose 1.22.0
domain ddev.local
router drud/ddev-router:v1.6.0
web drud/ddev-webserver:v1.6.0

Related

Deploying Laravel to Azure - Laravel 8

I have managed to deploy my laravel application to Azure using Bitbucket. Since i am unable to run composer install on Azure Devops, I git commit the vendor folder to the bitbcuket for deployment.
I understand the best practice is to ignore the vendor folder and run composer install on the server to install all dependencies.
Is there a way i can run composer install on Azure Devops pipeline so i could gitignore the vendor folder during my git push ?
In order to install composer inside your project folder, you should provide read and write access. Following method will help you to install composer
sudo chmod -R 777 /var/www/html/PROJECT_FOLDER_NAME
sudo composer install

Laravel sail / composer require: chmod (directory attributes) error: Operation not permitted

I'm trying to run composer with Laravel Sail but getting errors:
$ sail composer require laravel/passport
Using version [32m^10.1[39m for [32mlaravel/passport[39m
[32m./composer.json has been updated[39m
[32mRunning composer update laravel/passport[39m
[32mLoading composer repositories with package information[39m
[32mUpdating dependencies[39m
[32mLock file operations: 13 installs, 0 updates, 0 removals[39m
- Locking [32mdefuse/php-encryption[39m ([33mv2.2.1[39m)
- Locking [32mfirebase/php-jwt[39m ([33mv5.2.1[39m)
- Locking [32mlaravel/passport[39m ([33mv10.1.0[39m)
- Locking [32mlcobucci/clock[39m ([33m2.0.0[39m)
- Locking [32mlcobucci/jwt[39m ([33m4.1.1[39m)
- Locking [32mleague/event[39m ([33m2.2.0[39m)
.
.
.
- Installing [32mlcobucci/jwt[39m ([33m4.1.1[39m): Extracting archive
- Installing [32mparagonie/random_compat[39m ([33mv9.99.100[39m): Extracting archive
- Installing [32mdefuse/php-encryption[39m ([33mv2.2.1[39m): Extracting archive
- Installing [32mleague/oauth2-server[39m ([33m8.2.4[39m): Extracting archive
- Installing [32mfirebase/php-jwt[39m ([33mv5.2.1[39m): Extracting archive
- Installing [32mlaravel/passport[39m ([33mv10.1.0[39m): Extracting archive
0/13 [>---------------------------] 0% [30;43mFailed to extract lcobucci/clock: (1) unzip -qq '/var/www/html/vendor/composer/tmp-252368372558a177ddb259c3ca81856b' -d '/var/www/html/vendor/composer/29d600e9'
chmod (directory attributes) error: Operation not permitted
fchmod (file attributes) error: Operation not permitted
warning: cannot set modif./access times for /var/www/html/vendor/composer/43c7b0b4/laravel-passport-c2b93a7/LICENSE.md
Operation not permitted
fchmod (file attributes) error: Operation not permitted
warning: cannot set modif./access times for /var/www/html/vendor/composer/43c7b0b4/laravel-passport-c2b93a7/README.md
Operation not permitted
.
.
.
warning: cannot set permissions for /var/www/html/vendor/composer/43c7b0b4/laravel-passport-c2b93a7/config/
Operation not permitted
warning: set times/attribs failed for /var/www/html/vendor/composer/43c7b0b4/laravel-passport-c2b93a7/config/
warning: cannot set modif./access times for /var/www/html/vendor/composer/43c7b0b4/laravel-passport-c2b93a7/
Operation not permitted
warning: cannot set permissions for /var/www/html/vendor/composer/43c7b0b4/laravel-passport-c2b93a7/
Operation not permitted
warning: set times/attribs failed for /var/www/html/vendor/composer/43c7b0b4/laravel-passport-c2b93a7/
[39;49m
The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
Unzip with unzip command failed, falling back to ZipArchive class
[37;41mInstall of laravel/passport failed[39;49m
I've basically just followed the docs for installation, then proceeded to try and install a package. Can't find anything specific to Sail online with this error. Any ideas?
Full Disk Access to Terminal from Security & Privacy fixed my issue.
I ran into exactly the same problem while trying to install Laravel Breeze in a Docker container using the sail command.
Simply run this command in your application directory within your Docker container first:
docker run --rm \
-u "$(id -u):$(id -g)" \
-v $(pwd):/var/www/html \
-w /var/www/html \
laravelsail/php81-composer:latest \
composer install --ignore-platform-reqs
The command installs all the latest required composer dependencies and updates your composer file without any of the file restrictions you encountered. In my case, it automatically ran sail composer require laravel/breeze --dev command for me without me having to run it manually.
After that, I only needed to run
sail artisan breeze:install
sail npm install
sail npm run dev
in order.
You can see more details in the Laravel documentation here.
Worked to fix the same issue for me:
./vendor/bin/sail up -d
For me, it was caused by enabling VirtioFS in Docker Desktop 4.6.0 for Mac. I had to disable it and go back to previous driver. However, there're working on it, so probably it'll be fixed in the near future.
In WSL, I was able to solve the problem by enabling chmod.
Please refer to the following issue for instructions.
https://github.com/Microsoft/WSL/issues/81#issuecomment-796798258

Can not instal laravel

The "http://repo.packagist.org/p/guzzlehttp/psr7%24a1ea6550f2764cbd6a29394f3c79fe41efb9cfc4bc22558b00a4a0e5573d63c1.json" file could not be downloaded: failed to open stream: HTTP request failed!
http://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Is this on composer install within a project or up creation with something like laravel new laravel.local?
If it's in a current project, try deleting the composer.lock file and deleting the /vendor folder, then running composer clearcache, then composer dump-autoload, and then finally reinstall all the vendor packages with composer install

How to install Venia PWA Theme on Magento 2.3 using cPanel on Dedicated Server?

I have used git to clone pwa-studio theme, but still unable to run commands like yarn install. Tried installing node.js/npm but couldn't because I am on a dedicated server. From where do I install the pwa-studio theme without any error and how?
I hope this will help you,
You will see the pwa-studio directory in /var/www/html/mage0.
Enter into this directoy:
cd pwa-studio/
Run
yarn install
Specify the Magento backend server in .env file.
cp packages/venia-concept/.env.dist packages/venia-concept/.env
Open this .env file and find MAGENTO_BACKEND_URL.
MAGENTO_BACKEND_URL="https://magento-2-local/" # your local path
Find the deployVeniaSampleData.sh file in
/var/www/html/mage0/pwa-studio/packages/venia-concept/ directory. and copy this
file in your Magento root directory. Now it must look like
/var/www/html/mage0/deployVeniaSampleData.sh Now run:
bash deployVeniaSampleData.sh
After successful installation run:
bin/magento setup:upgrade bin/magento
indexer:reindex bin/magento
cache:flush
Now go back to pwa-studio directory /var/www/html/mage0/pwa-studio and
start Server.
yarn run build or sudo yarn run build
Run server, Use any of the following commands from the project root directory to start
the server:
yarn run watch:venia
yarn run watch:all
yarn run build && npm run
stage:venia
Now browse the application, you will the application url on terminal like:
PWADevServer ready at https://magento-venia.local.pwadev:8001
Thanks,

How to install Laravel as Apache user

First off: I'm very familiar with Composer and also Symfony and some other MVC frameworks.
I tried the following installation documentation, but I'm stuck on how to properly install a laravel project as "apache:apache" under "/var/www/html" on a CentOS 6 virtual machine.
I ran the composer global require "laravel/installer" command, and it says to put "~/.composer/vendor/bin" in your PATH. So I presume this command (laravel install) is done as a normal user (not root), and the folder will exist in your home directory when run.
I added to my path by editing my /etc/profile to include this. But when I try to run laravel new laraveltest in the /var/www/html folder (owned by apache), I get:
[abunk#Alvin-CentOS6 html]$ laravel new laraveltest
Crafting application...
PHP Warning: file_put_contents(/var/www/html/laravel_572e877d514bacbb7381860b8307a067.zip): failed to open stream: Permission denied in /tmp/.composer/vendor/laravel/installer/src/NewCommand.php on line 122
PHP Warning: ZipArchive::extractTo(): Permission denied in /tmp/.composer/vendor/laravel/installer/src/NewCommand.php on line 140
PHP Warning: ZipArchive::close(): Invalid or uninitialized Zip object in /tmp/.composer/vendor/laravel/installer/src/NewCommand.php on line 142
Composer could not find a composer.json file in /var/www/html
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Application ready! Build something amazing.
So then I copied the folder /home/abunk/.composer to /tmp/.composer; and then I ran su -s /bin/sh apache -c "laravel new laraveltest" from the /var/www/html folder (this should run as apache).
But instead I get this:
[abunk#Alvin-CentOS6 html]$ su -s /bin/sh apache -c "laravel new laraveltest"
Password:
Crafting application...
PHP Warning: proc_open(/dev/tty): failed to open stream: No such device or address in /tmp/.composer/vendor/symfony/process/Process.php on line 290
[Symfony\Component\Process\Exception\RuntimeException]
Unable to launch a new process.
new [--dev] [--] []
So my question is (or maybe this is really a bug): How do install as the apache user? Any recommendations?
I could do this as root user, but I think it's a bad idea to run Composer as root user.

Resources