Closed milowei closed 8 years ago
I think you are trying to require it in the very same package you obtained by cloning this from GitHub ;-) It does not make sense to require itself for composer obviously.
I am also seeing the same message. DrDelay, not sure what you mean by "trying to require it in the very same package you obtained by cloning." I performed the following steps:
From the Windows Command Prompt:
Then I get the error milowei mentioned above.
Additionally, the "vendor" folder never gets created.
composer require nicklasw/pkm-go-api
(or create composer.json with min-stability: dev first if it complains about it)require vendor/autoload.php
in your projectDrDelay. I did those steps and still have the same error. What I did to get around this error is I changed the name in the composer.json file to "pkm-go-api" and that seem to work as far as getting the dependencies and files.
Now I am tackling issue #75 Fatal error: Uncaught Error: Class 'NicklasW\PkmGoApi\Authenticators\Factory' not found
OK, the Authenticators\Factory-error is something else, I won't look into that right now.
But, again, I don't believe you did those steps. If you did them, you wouldn't have a composer.json with name nicklasw/pkm-go-api in your directory. Now you probably have the repo twice, once in your project root AND once in your /vendor, where the first one won't receive updates via composer.
I can't believe I did a video for that: https://gfycat.com/QualifiedSpeedyDiscus
@DrDelay Haha, can't be much clearer then that 👍
@DrDelay Hands down. Thank you. I got it working with your example.
@milowei follow the steps mentioned by @DrDelay in the video. Start from scratch (delete everything in your current directory). This is all you need.
Note: I am new to composer. The mistake I was making is cloning / downloading the entire project and then, from within the folder where the project was in, attempting to execute "composer require nicklasw/pkm-go-api"
Resolved. Credits to @DrDelay for the clip.
i am afraid you are trying to obtain a same package name with your project . make sure they are different
How to fix this?
Root package 'nicklasw/pkm-go-api' cannot require itself in its composer.json Did you accidentally name your root package after an external package?