Closed jdelia closed 6 years ago
The same as Jackie's, using Local with PHP 7.0.3 , WordPress 4.8, nginx server
composer install
-bash: composer: command not found
composer install
, received the same error -bash: composer: command not found
php composer install
, received new error could not open input file: composer
php composer.phar install
and received a long list of errors, the first saying Problem 1 - This package requires php ^7.0 but your PHP version (5.6.30) does not satisfy that requirement.
which doesn't make sense since I am running 7.0.3 for this install. gulp
ran without asking for a missing module. It ran through quite a bit then broke on this error, which I'm guessing is from missing files yet to be installed or a misread of the php version, here is the top snippet of the error:/Users/Ginger/Local Sites/upro2/app/public/wp-content/themes/utility-pro-2.0.0-dev/node_modules/gulp-wp-pot/index.js:54
contents: Buffer.from(potContents)
TypeError: this is not a typed array.
at Function.from (native)
at DestroyableTransform._flush (/Users/Ginger/Local Sites/upro2/app/public/wp-content/themes/utility-pro-2.0.0-dev/node_modules/gulp-wp-pot/index.js:54:24)
at DestroyableTransform.<anonymous> (/Users/Ginger/Local Sites/upro2/app/public/wp-content/themes/utility-pro-2.0.0-dev/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:138:49)
at DestroyableTransform.g (events.js:260:16)
at emitNone (events.js:67:13)
at DestroyableTransform.emit (events.js:166:7)
At this point, I am stalled until I can learn further instructions.
Will look more and post better instructions tomorrow, but Ginger's is due to Local not supporting Composer by default, and then running it from her machine, instead of right-click -> Open in SSH (which would then use the right version of PHP). Not the fault of UP2.
Jackie's looks like it's pulling down not-the-right version of TGMPA, where we've fixed a recent global call. Replace it was develop branch, which includes a return, and the post install composer script should work fine.
Right click the site and Open in SSH. Then:
apt-get update && apt-get install -y wget
wget -qO- https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
The Local SSH needs some prep work.
# Allow Code Standards to be installed
cd /app/public/wp-content/themes/utility-pro/vendor/squizlabs/php_codensniffer
chmod 666 CodeSniffer.conf
# Install sudo, curl, git and apt-transport-https packages.
apt-get install sudo curl git apt-transport-https
# Add repo for Node.JS 8.
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
# Install Node.JS 8 and npm.
sudo apt-get install -y nodejs
# Optionally, add repo for Yarn (alternative for npm).
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
# Optionally install Yarn.
sudo apt-get install yarn
# Tidy up any un-needed libraries.
apt-get autoremove
Now you should be able to:
cd app/public/wp-content/themes/utility-pro
composer install
@GaryJones Thanks for this. I will run through this again over the weekend and see if I can get things working properly.
Same here: I will be able to focus better on getting this working over the weekend.
@GaryJones Thank you for your detailed instructions!
composer install
and even though it had some errors, it created the vendor folder and the squizlabs/php_codensniffer folder so I was able to proceed.chmod 666 CodeSniffer.conf
I did not have that file but I did have CodeSniffer.conf.dist so I used that.composer install
again and it ran, albeit with a few errors.Also attaching my full SSH window contents for reference: Terminal-Saved-Output.txt
@gspice I don't think you pulled down the latest version of UP 2.0.0-dev before starting, as your output (useful to include, thanks!) shows you have TGMPA 2.6.1 instead of the develop
branch.
@GaryJones You are correct, I had the previous develop branch, this time I downloaded 2.0.0-dev.
Here's my terminal output:
@gspice Still the same error.
Before doing a composer install
, do a composer update
, so that it updates the lock file. Right now, it still pulled down TGMPA 2.6.1, and not the dev-develop
.
See the:
Error: Call to undefined function did_action() in /app/public/wp-content/themes/utility-pro-2.0.0-dev/vendor/tgmpa/tgm-plugin-activation/class-tgm-plugin-activation.php on line 2109
This was fixed by adding https://github.com/TGMPA/TGM-Plugin-Activation/blob/ec6a3f286e095facdabb19aa1b9e5f2794dddf51/class-tgm-plugin-activation.php#L35-L38 to the start of that TGMPA file.
I'll see about getting a new TGMPA release done this week.
Also, you could update your system PHP, and then use composer on your host machine (not inside Local's SSH) to do the composer actions.
@GaryJones I'm closer! :-)
composer update
at the end of the black area# Allow Code Standards to be installed cd /app/public/wp-content/themes/utility-pro/vendor/squizlabs/php_codensniffer chmod 666 CodeSniffer.conf
composer install
and everything appeared to load, the style.css was generated.watch
for CSS changesError: Missing binding /Users/Ginger/Local Sites/upro2/app/public/wp-content/themes/utility-pro-2.0.0-dev/node_modules/node-sass/vendor/darwin-x64-47/binding.node Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 5.x
Found bindings for the following environments:
This usually happens because your environment has changed since running npm install
.
Run npm rebuild node-sass --force
to build the binding for your current environment.
npm rebuild node-sass --force
gulp
again, at the end received this error:
/Users/Ginger/Local Sites/upro2/app/public/wp-content/themes/utility-pro-2.0.0-dev/node_modules/gulp-wp-pot/index.js:54
contents: Buffer.from(potContents),
^
TypeError: this is not a typed array.
at Function.from (native)The npm rebuild should be a one-off task, each time you update Node.
The gulp-wp-pot
issue can be reported at https://github.com/rasmusbe/gulp-wp-pot to see if they can identify the issue.
@jdelia I'm closing this out. I'll upload a fresh branch for testing before Monday and please create a new issue if the problem persists.
I receive an error after checking out 2.0.0-dev branch and run composer install https://cl.ly/2i203o2w0g2T
Expected Behavior
Thought I would load a fresh copy of UPRO 2.0 to have a look at the blog page template issue.
Current Behavior
This is a fresh install for 2.0.0-dev - tried running composer install first. Received the error. Ran npm install and that finished without error.
Possible Solution
Not sure what is wrong.
Steps to Reproduce (for bugs)
[utility-pro] (2.0.0-dev)$ composer install Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Nothing to install or update Generating autoload files
Fatal error: Uncaught Error: Call to undefined function did_action() in /Users/loneduchess/Local Sites/utility-pro-2/app/public/wp-content/themes/utility-pro/vendor/tgmpa/tgm-plugin-a ctivation/class-tgm-plugin-activation.php:2109 Stack trace:
0 /Users/loneduchess/Local Sites/utility-pro-2/app/public/wp-content/themes/utility-pro/vendor/composer/autoload_real.php(66): require()
1 /Users/loneduchess/Local Sites/utility-pro-2/app/public/wp-content/themes/utility-pro/vendor/composer/autoload_real.php(56): composerRequire77a62ca96cd94535a00b72d63329e908('a5f882
d89ab791a...', '/Users/loneduch...')
2 /Users/loneduchess/Local Sites/utility-pro-2/app/public/wp-content/themes/utility-pro/vendor/autoload.php(7): ComposerAutoloaderInit77a62ca96cd94535a00b72d63329e908::getLoader()
3 /Users/loneduchess/Local Sites/utility-pro-2/app/public/wp-content/themes/utility-pro/vendor/squizlabs/php_codesniffer/CodeSniffer/CLI.php(27): include_once('/Users/loneduch...')
4 /Users/loneduchess/Local Sites/utility-pro-2/app/public/wp-content/the in /Users/loneduchess/Local Sites/utility-pro-2/app/public/wp-content/themes/utility-pro/vendor/tgmpa/tgm-plu
gin-activation/class-tgm-plugin-activation.php on line 2109 Script "vendor/bin/phpcs" --config-set installed_paths ../../wp-coding-standards/wpcs handling the install-standards event returned with error code 255
Context
Unable to proceed.
Your Environment