flynt
flynt copied to clipboard
composer install not working twig/cache-extension is abandoned
I've tried with composer latest version then found this issue. Later i tried with composer 1.9.0 and 1.8.0 still same. Package twig/cache-extension is abandoned, you should avoid using it. Use twig/cache-extra instead.
Can anyone help me to run composer install command.
Here is some more from console
composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Package twig/cache-extension is abandoned, you should avoid using it. Use twig/cache-extra instead.
Package twig/extensions is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
@shamimsdp regarding to the provided console output it looks that the composer has done his job as he should. What exactly does not work?
And did get you also errors when you execute npm i && npm run build
inside the theme folder?
@timohubois Yes build fails every time.
@shamimsdp can you provide the log of the build script here?
Here is the script
> [email protected] build C:\Users\shami\DevKinsta\public\imagery\wp-content\themes\flynt-1.4.1
> run-s --silent checkVersion clean lint build:production build:rev
node: 14.15.0
FILE: ...y\wp-content\themes\flynt-1.4.1\lib\Utils\TwigExtensionFlynt.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
11 | ERROR | [x] Opening brace must not be followed by a blank
| | line (PSR12.Classes.OpeningBraceSpace.Found)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 1.93 secs; Memory: 10MB
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `run-s --silent checkVersion clean lint build:production build:rev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\shami\AppData\Roaming\npm-cache\_logs\2022-09-15T16_35_28_934Z-debug.log
Here is the debug log file 2022-09-15T16_35_28_934Z-debug.log
Hey 👋
Did you try using node 12 instead of node 14 as 12 is the correct version to be used for flynt ?
> [email protected] build C:\Users\shami\DevKinsta\public\imagery\wp-content\themes\flynt-1.4.1
> run-s --silent checkVersion clean lint build:production build:rev
node: 12.22.12
FILE: ...y\wp-content\themes\flynt-1.4.1\lib\Utils\TwigExtensionFlynt.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
11 | ERROR | [x] Opening brace must not be followed by a blank
| | line (PSR12.Classes.OpeningBraceSpace.Found)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 725ms; Memory: 10MB
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `run-s --silent checkVersion clean lint build:production build:rev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\shami\AppData\Roaming\npm-cache\_logs\2022-09-15T17_06_42_382Z-debug.log
still same issue @philipphaunstetter
@philipphaunstetter is there any specific version required? Can you give me that node 12 version?
@philipphaunstetter is there any specific version required? Can you give me that node 12 version?
You can find all dependencies here.
I just cloned a project again and everything works really fine for me.
@timohubois are there more things going on with windows? I am not familiar with windows :)
@shamimsdp node: 14.20.0 works fine for me ...
> [email protected] build C:\Users\shami\DevKinsta\public\imagery\wp-content\themes\flynt-1.4.1
> run-s --silent checkVersion clean lint build:production build:rev
node: 14.20.0
FILE: ...y\wp-content\themes\flynt-1.4.1\lib\Utils\TwigExtensionFlynt.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
11 | ERROR | [x] Opening brace must not be followed by a blank
| | line (PSR12.Classes.OpeningBraceSpace.Found)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 2.72 secs; Memory: 10MB
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `run-s --silent checkVersion clean lint build:production build:rev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\shami\AppData\Roaming\npm-cache\_logs\2022-09-15T17_32_27_155Z-debug.log
My dependencies: PHP 7.4.1 node v14.20.0 Composer 1.8.0
@shamimsdp can you try to fix the error mentioned in the build process? Remove the blank line (line 12?!) in the file TwigExtensionFlynt.php and rerun the build
@shamimsdp The problem you seem to have during the build is a "linting" problem. During the build it is checked that the code follows certain rules. It's usually about "styling" of the code (as in your case not having unnecessary blank lines) and probably doesn't mean there is a functional problem in your code or that it's broken.
What you can do is either follow the rules and in this case fix the "Opening brace must not be followed by a blank
| | line (PSR12.Classes.OpeningBraceSpace.Found)" error or just use npm run build:production
to build without checking the linting rules.
If you want to use linting, which is generally a good idea in my opinion, the easiest is to enable an autofixer that is run each time you save a file in your editor. I use PHP Sniffer & Beautifier in Visual Studio Code for example.
@shamimsdp it seems that there is a linting error at the current release, which was not showing before.
Please navigate to the theme folder an execute this command:
npm run lint:php:fix && npm run build
Does this help?
@shamimsdp the issue should be fixed now, see #464