Opis\Closure\SerializableClosure - Error afer PHP 8.1 Update - laravel-8

I have updated my system to PHP 8.1 (XAMPP).
Now I have the problem that when I enter the command "php artisan serve" I get the following error message:
Opis\Closure\SerializableClosure implements the Serializable interface, which is deprecated.
Implement __serialize() and __unserialize() instead
(or in addition, if support for old PHP versions is necessary).
Can you help me what I can do to make it work again?

You need to update laravel dependencies. Simply go to your project root directory and use composer to update dependencies using command prompt.
Command should be:
composer update

composer upgrade laravel/framework --with-all-dependencies
You would need to update laravel/framework with it's dependencies. Instead of running composer upgrade which upgrades all packages, you could just run composer upgrade laravel/framework --with-all-dependencies, shorthand is -W.
From the composer command help -W Update also dependencies of packages in the argument list, including those which are root requirements.

Just delete composer.lock.json, with me resolve and after run composer install

Related

NVM for windows is failing when using npm prestart scripts

When I try to run my project, doing npm start I am getting the below. We have this chain in our project since some repos are using different node versions. I have nvm-windows 1.1.9 latest installed. I have tried a machine recycle, re-installing nvm for windows, deleting the packages and modules and much more. Whats interesting is that when I remove the prestart script and am on the required version by doing nvm use 18.4.0 this works, also when I add back in the prestart script and use for instance nvm use 12.22.12 the prestart script executes fine when running npm start and the version changes t0 18.4.0 with no issue, but if I stop the project and start it again it fails with the below and either I need to remove the prestart script or change to a different version. I am not understanding how this could be.
prestart
nvm install 18.4.0 && nvm use 18.4.0
This is not the package you are looking for: please go to http://nvm.sh

npm rebuild, electron-rebuild doesn't use special parameters

I have an electron/React app running. So after I install all packages I have to execute electron-rebuild so there are no version issues.
I install one package in the preinstall script: npm install better-sqlite3 --build-from-source --sqlite3=my sqlite amalgamation folder
Now the problem is that electron-rebuild/npm rebuild just installs better-sqlite3 and not better-sqlite3 with my customized amalgamation.
This makes it unusable for me because I need my customized version of sqlite.
Does anyone know how to solve this, how to make electron-rebuild/npm rebuild install that package with the extra parameters?
I created a library to fix this issue/get around it: https://www.npmjs.com/package/better-sqlite3-sqleet.
So the problem is solved for me, but it would be nice to still have an answer on the original question.

tns plugin add nativescript-floatingactionbutton Installation Failed

I wanted to use the Floating button in my App.
tns plugin add nativescript-floatingactionbutton
But the Installation failed. Below is the installation error.
I tried this also
sudo npm i nativescript-floatingactionbutton
This looks like a permission error, since it is not able to write to your node_modules folder.
sometimes sudo doesn't work you just have to do su first then Enter, then type commands normally like tns plugin add nativescript-xxxxxxx

Moonmail installation issue - Command "project" not found

I'm initializing Moonmail and following the readme, executing the following command:
sls project init -c -n your-lower-case-project-name
I'm getting the following:
Command "project" not found, Run "serverless help" for...
It seems that Serverless no longer has the "project" command (since version 0.5) and it has been replaced with "service" (which works a little differently).
What would be the way forward here?
Although they say that Moonmail supports version 0.5.2 or higher, it's not true. You need to use version 0.5x of the Serverless Framework and you can't use any version 1.x because 1.x is a complete rewrite.
Unfortunately, the solution is to uninstall the current Serverless Framework and install an old version.
npm -g uninstall serverless
npm -g install serverless#0.5.6

Install extension in Yii2

Hi can someone show me steps how can I install fabric.js in yii2 project? This is Fabric.js: link to github
There I can see that I can install fabric.js only by bower or npm. I don know that i have bower on start in Yii2 procejct or I should I install this bower. Now I only used composer install and update. And I dont know how to install this in my project. Maybe anyone can show me easiest way to install this by composer only or other easy way? I tried to write command :
bower install fabric
but i have error:
bash: bower: command not found
Make sure you have got Composer asset plugin installed. If not run console command:
composer global require "fxp/composer-asset-plugin:^1.2.0"
All you have to do now is to add in require section of composer.json
"bower-asset/fabric": "*"
and run composer update command in console (in the project folder).