This module cannot enabled at all.

Since the composer install is broken and not working I tried to add MASTER version of the libraries to /vendor folder, but the install process still tells the library does not exists. core/rebuild.php has also not helped.

CommentFileSizeAuthor
#42 WeChat Image_20180201132114.png33.24 KBsealionking

Comments

hass created an issue. See original summary.

bojanz’s picture

Category: Bug report » Support request
Priority: Major » Normal

Composer can't work that way, it needs to download the dependencies and then update the autoloader, adding a folder manually does nothing.

So let's find out why composer drupal-update fails for you.

hass’s picture

Category: Support request » Bug report
Priority: Normal » Major

This is not a question of composer. This is a question how people can install the stuff manually. I do not want to use composer at all and requiring it is stupid. Please documented how to manually install the library in readme, too.

bojanz’s picture

Category: Bug report » Support request
Priority: Major » Normal
Status: Active » Fixed

There is no way to manually install a library. Composer is not optional in modern PHP.

See http://bojanz.wordpress.com/2015/09/18/d8-composer-definitive-intro/ for more information.

hass’s picture

Status: Fixed » Active

That's a joke isn't it? What type of voodoo does composer do? Copy an archive to a folder and extract it? That is nothing spectacular.

Drupal does not require composer. It is optional.

I still need to know how to install manually. I already extracted the 3 libs to /vendor folder. What else need to be done?

bojanz’s picture

Drupal does not require composer. It is optional.

Actually, Drupal does require Composer, if you want to use the git version. https://www.drupal.org/node/2648064

In any case, you seem to know best, so I'll let you invent a solution. Have fun, and let us know your conclusions.

hass’s picture

Git versions of drupal are always unstable. I'm only running stable versions in production. Not sure why the libs have no release and only master is installed.

I have no fun with this module. I really wish it would simply work.

hass’s picture

Status: Active » Closed (duplicate)
Parent issue: » #2735965: composer drupal-update fails / Could not decode JSON: Syntax error
hass’s picture

Correct folder structure is as follows:

  • /vendor/commerceguys/addressing
  • /vendor/commerceguys/enum
  • /vendor/commerceguys/intl
  • /vendor/commerceguys/zone
ashokshrestha’s picture

I also have been stuck for two days trying to fix the issue address requires the commerceguys/address. But it was simple when i followed the documentation for address module installation throughly. https://www.drupal.org/project/address

I first installed the composer manager module and download the address module.
Then added following code in terminal serially.
1. composer config repositories.drupal composer https://packages.drupal.org/8
2. composer require "drupal/address ~1.0"
3. composer update drupal/address --with-dependencies

After then address module can be easily installed.

borisson_’s picture

I first installed the composer manager module and download the address module.
Then added following code in terminal serially.
1. composer config repositories.drupal composer https://packages.drupal.org/8
2. composer require "drupal/address ~1.0"
3. composer update drupal/address --with-dependencies

You don't need to install composer manager or download the address module, the only steps needed are the ones you noted here: configure the repositories, require address.

You should be fine with doing composer install instead of doing composer update. Update will actually update the dependency, so you might run into unexpected changes.

noman_297’s picture

i am working locally on windows using xampp,i am doing fresh installation of drupal opensocial still this Address requires the commerceguys/addressing library coming.

jovandevoorde’s picture

I am struggling with the same(?) problem
I've done the steps in the post of borisson.
after the second step i get

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packages>]...

after the third step i get

Package "drupal/address--with-depencencies" listed for update is not installed. Ignoring.
Loading composer repositories with package information

                                                                                
  [Composer\Downloader\TransportException]                                      
  The "https://packages.drupal.org/!/packages.json" file could not be downloaded (HTTP/1.1 302 https://www.drupal.org/!/packages.json)
                                                                                

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...

any help?

borisson_’s picture

Package "drupal/address" listed for update is not installed. Ignoring.

composer require "drupal/address".

The --with-depencencies flag shouldn't be in the quotes.

jovandevoorde’s picture

when i redo the 3 steps now i get after step 2 the following message

 composer require "drupal/adddress~1.0"

                                                                                
  [Composer\Downloader\TransportException]                                      
  The "https://packages.drupal.org/!/packages.json" file could not be downloaded (HTTP/1.1 302 https://www.drupal.org/!/packages.json)
                                                                                

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packages>]...
borisson_’s picture

[Composer\Downloader\TransportException]
The "https://packages.drupal.org/!/packages.json" file could not be downloaded (HTTP/1.1 302 https://www.drupal.org/!/packages.json)

Looks like your composer.json is not correct, can you post the content of that? (http://hastebin.com/ or something similar will be easier than just posting it here)

jovandevoorde’s picture

http://hastebin.com/gidiyoziza.json
perhaps i need to restart the whole proces.

borisson_’s picture

That's not drupal's composer.json. From reading your earlier comment, there are 2 things I can see that might be wrong:

1. composer require "drupal/adddress~1.0" should be composer require "drupal/address ~1.0" (note only 2 d's in address and the space before the version).
2. https://packages.drupal.org/!/packages.json It should be looking for https://packages.drupal.org/8/packages.json, so that's why I think your composer config wasn't correct.

Hope this helps.

jovandevoorde’s picture

thxs, but till now no result, I'm going to start all over again.
grts

jovandevoorde’s picture

I make a new project.
First step no problem
Secund step give the following error http://hastebin.com/mekaruwofo.pl

borisson_’s picture

I just tried again, with a fresh drupal 8.2 - see http://hastebin.com/ovezulakix.tex

I don't see any of the output you see.

jovandevoorde’s picture

When i follow your script i end at the same point
see http://hastebin.com/coquducaha.pl

bojanz’s picture

  [ErrorException]
  escapeshellarg() has been disabled for security reasons

This looks like a server-specific error, the server on which you're running Composer is too locked down to actually run Composer.
In that case it might be easier to run Composer locally and then upload/commit the result.

jovandevoorde’s picture

oké, i try that

jovandevoorde’s picture

Contact with my host learn me that i have to choose for another php version.
When i choose for an other than de native version 5.6 everything run like it has to run.
at last

buckrey’s picture

I did a work around by issuing : composer require "drupal/address 1.0.0-beta4" , which is an older version of address , and it installed correctly for both the address module and addressing libraries

Andrey_T’s picture

Version: 8.x-1.0-beta2 » 8.x-1.x-dev
Assigned: Unassigned » Andrey_T
dewancodes’s picture

It worked fine for me by putting commerceguys/addressing library into /vendor folder.

Thanks mate :)

theguy39’s picture

Ok, I know its old issue but I had this problem and think I found a simple solution that might help some noobs like myself aswell,
Basically - This worked for me I didn't want to give up but am fairly new to Linux and Composer and Drupal in general but on many threads there was no simple solution for this issue and my method was pretty darn easy, I basically download composer, let it auto install Drupal8 and commerce package to folder I want, Then update composer add the code to composer.json update again and you see it download files I needed goto Drupal 8 activate the commerce modules one at a time and finally worked with no errors or anything missing!

What I did when I kept having libraries issues ect

#Install Composer :#

$ cd /usr/src
$ sudo apt-get install curl php5-cli
$ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

#Verify installation:#

$ composer --version

#In composer you can do fresh install or skip this step if already installed, but Might have to back it up and just copy the files back after and do a fresh install if get any other errors or issues#

composer create-project drupalcommerce/project-base /var/Your_Website --stability dev

#Update Composer very important as it changes the .json file alot#

composer update

#Then add to composer.json (make sure to put in the , when adding the lines to the already existing "require" column)

{
"require": {
"commerceguys/intl": "dev-master",
"commerceguys/addressing": "dev-master",
"commerceguys/zone": "dev-master"
}
}

#Update Composer again very important as this will download the libraries you just added to the .json#

composer update

DONE

theguy39’s picture

I found Errors in my own post will update when I fix them

pazhyn’s picture

I just followed install instructions and address module is being installed ok.
http://cgit.drupalcode.org/address/tree/README.md

omrmankar’s picture

Drupal 8 Address Module Not working

Please Give Me Proper Solution Address Module They do not install they want libraries I will already install libraries but they show error validation error 1st. Address requires the commerceguys/addressing library. 2nd.Address requires the commerceguys/zone library.

Please Give Solution I Really Need To Install my new project

remyyyyy’s picture

Same problem here..
Drupal 8.3.2
Commerce 8.x-2.0-beta7

nileema19’s picture

sharif.tanveer’s picture

Hi,

I have no php knowledge neither know writing any command lines from putty. For users like us- can anyone please show some light... what exactly process and exact code we need in order to set up and run composer from server.

For noob users like me- we don't know what is composer, benefits or why using it... we just need to use it because some module makes it mandatory... and it looks like- drupal 8's most of the new module will make it in this way.

If someone has time to write details about downloading, placing files to which directory, installing and running it on remote server... will help people like us... a lot

I glad that I could make some powerful websites and ecommerce sites just combining few modules in drupal 7, without any knowledge of css/html/php . I just want to live like that once again :) with new drupal 8 :)

xmacinfo’s picture

kamalpreet singh’s picture

Hello
I found the solution of this Issue on youtube.
https://www.youtube.com/watch?v=VLR5EsqS8UM
This is the Exactly what we want without Composer. Composer not doing any Voodoo. There is always an alternate way.

Regards
Kamalpreet

PoidsTotal’s picture

The only way that worked for me what to update core to 8.4.4 and use
composer require commerceguys/addressing
composer require commerceguys/intl

jasonglisson’s picture

@PoidsTotal
I'm having the same issue updating core. I did those two same commands and it's still complaining.

Fatal error: Class 'CommerceGuys\Addressing\AddressFormat\AddressFormatRepository' not found in /var/www/docroot/modules/contrib/address/src/Repository/AddressFormatRepository.php on line 16

However, the file is present and the path does exist. So...I'm not sure. Cache rebuild is busted as well.

xmacinfo’s picture

After running composer, make sure that the addressing folder exists in the /vendor directory :

vendor/commerceguys/addressing

babinlal’s picture

#10 works. Thanks @ashokshrestha

sealionking’s picture

StatusFileSize
new33.24 KB

tried but still get Address requires the commerceguys/addressing library.
cannotbedone

xmacinfo’s picture

I think Composer downloaded the files in the wrong vendor/ folder. Please check the content of your vendor or vendors folders (as Composer may create a new vendor folder in the wrong location if the composer require is not run at the correct location.

sealionking’s picture

just restarted the apache after the composer command, it works

szubkov’s picture

For those who don't want to use composer:
https://www.drupal.org/project/ludwig

That's super easy to use! Just enable it (as usual) and go to /admin/reports/packages

ressa’s picture

Last time I checked, Ludwig required a ludwig.json in the module itself, see fx https://www.drupal.org/project/search_api_solr/issues/2891694

bojanz’s picture

@ressa
Ludwig was literally written for Address module, so you can be certain that Address does contain a ludwig.json file.

ressa’s picture

@bojanz
Ah yes, you're right. And thanks for creating Ludwig by the way.

appointments’s picture

Install Address Module

Error Message

Commerce Price requires the commerceguys/intl library.
Address requires the commerceguys/addressing library.

Great Video on youtube

https://www.youtube.com/watch?v=VLR5EsqS8UM

Google How to install drupal8 COMMERCE the easy way with Ludwig not composer

Download the libraries create lib folders in address module and commerce

Folder STURCTURE MODULE Address

Copy libraries into folders

/modules/address/lib/commerceguys-addressing/v1.0.0-beta3

Modules address lib commerceguys-addressing v1.0.0-beta3

/modules/address/lib/commerceguys-enum/v1.0

modules address lib commerceguys-enum v1.0

STURCTURE MODULE Commerce

public_html/modules/address/lib/commerceguys-enum/v1.0

public_html modules address lib commerceguys-enum v1.0

And enable address.

neelanjana das’s picture

we can do this manually in the following way:

go to:- site_name/vendor/ commerceguys folder
download and extract or clone from here:- https://github.com/commerceguys/addressing.

Thanks!

srikanth.g’s picture

what is the easiest way to fix "Address requires the commerceguys/addressing library."?
shall i use composer or ludwig or none(manual way of configuration)

Is this true for D8? "There is no way to manually install a library. Composer is not optional in modern PHP."

PBhatla’s picture

I am facing same error for Addressfield with Drupal 8.5.3, Can someone please advise ?

ferrete’s picture

The composer is not required in Drupal 8 although composer will assure that all dependencies will be installed.
If you do not wont to use composer at all you can use ludwig to install all dependencies manually but again is highly recommended the use of composer.

liliplanet’s picture

Now that took a while to understand :)

Open a command window on your computer, then

Add connect to your hostname (not domain name) that logs into your cpanel, add username and password

run cd public_html

run line by line the instructions at https://getcomposer.org/download/

then check php composer.phar

if that shows happiness, then just run

composer require commerceguys/addressing

composer require commerceguys/intl

johnvenpin’s picture

Thank you #54 last two lines do not work though

composer require commerceguys/addressing

composer require commerceguys/intl

Ended up using Ludwig and renaming folders according to instructions - it works - but will not get those 2 hours back - does n't anybody check anything these days.

Should we not just paste the addresses in the description, tell people to download them and create the appropriate directories - like a human dependency manager. Lets call it Composer - no wait....

bojanz’s picture

@johnvenpin
They don't work because you're not supposed to use them.
Address has official install instructions on the project page, and they work for 99% of the users.
Everyone who arrives to this thread and starts pasting random commands into the command line is not doing themselves any favors.

supriya1992’s picture

Address module requires an external library. We can install module by two way 1. using composer and 2. Manually install.
I am explaining here the 2nd method.
First download address module and place into modules/contrib/address.
Install Ludwig module, in the same way place into modules/contrib/ludwing and enable the module. This module will help to manage external libraries required by modules.
Goto admin/report/packages. Here all libraries listed with download link and description. For address module download Addressing library and place into modules/contrib/address/lib/commerceguys-addressing and rename the module folder with v1.0.3. So the final library location like modules/contrib/address/lib/commerceguys-addressing/v1.0.3.
Got admin/extend and enable address module.
If you are facing the same issue that "address module require commerceguys/addressing library" then please clear caches and try again.

drupguy4life’s picture

Thank you supriya1992 worked like a charm!

djg_tram’s picture

The Address people doesn't want to tell you, but it isn't that complicated.

Basically, the easiest way is to unpack a new Drupal somewhere on your computer, use a locally installed Composer to add Address, then check out the changes. There are two:

- the obvious one, the library copied under vendor/commerceguys/addressing
- three changed files in vendor/composer: installed.json, autoload_psr4.php, autoload_static.php

Just search for "addressing" in these three, note the changes and add them manually into your production files.

djg_tram’s picture

The Address people doesn't want to tell you, but it isn't that complicated.

Basically, the easiest way is to unpack a new Drupal somewhere on your computer, use a locally installed Composer to add Address, then check out the changes. There are two:

- the obvious one, the library copied under vendor/commerceguys/addressing
- three changed files in vendor/composer: installed.json, autoload_psr4.php, autoload_static.php

Just search for "addressing" in these three, note the changes and add them manually into your production files.

djg_tram’s picture

Now why was it duplicated and how can I remove one?

naveen433’s picture

how can i add phone number field to this module.. and i dont want to company field..

astroluzz’s picture

That's it! Clear cache. Other post guy say

I also got thes error using ludwig and after some playing around it seemed to have been solved by clearing cache in /admin/config/development/performance

After 1 hour, all was ok, just clear cache.

joray’s picture

#59 Thank you

dickensas’s picture

Ludwig module allows the libraries which can be installed inside the corresponding modules folder

/admin/reports/packages

we can manually install those by unzipping the corresponding source code

After doing a clear cache only we need to initiate the update script, then it works

dc_marc’s picture

Ludwig helped me install Commerce as well! Thank you.

urix’s picture

I solved this problem using Ludwig.
And clearing cache! Without cache clearing, I had this issue repeating.

devad’s picture

Assigned: Andrey_T » Unassigned

For all Ludwig users who has commented above that they needed the cache clear:

There is the automatic "Download and unpack missing packages" button at the top of Ludwig's Reports / Packages page. This button takes care of cache clear as well.

Note: If you are using Ludwig version prior to 8.x-1.4 it does not have the automatic "Download and unpack missing packages" button. So, upgrade to the latest one.

There are a lot of outdated Ludwig tutorials on WEB who are explaining the manual library setup steps. But the manual download and unpack of missing packages is not needed any more. Unless your server is not allowed to connect to external links.

Read more here:

Manual library setup [obsolete]

dschoni’s picture

By definition additional libraries should be installed in the /libraries folder.
I don't understand, why this modules libraries are installed in the modules ./lib folder.
Everything there should be installed by the module installer.
So this is something in a beta state, not a fully stable release.

catch’s picture

drumm’s picture

Closing comments at the request of bojanz. This issue was marked as a duplicate, and is not a good place to follow up.