[GH-ISSUE #42] Internal Error: Failure to open Required file #31

Closed
opened 2026-02-27 19:05:24 +03:00 by kerem · 1 comment
Owner

Originally created by @ryancocuzzo on GitHub (May 12, 2024).
Original GitHub issue: https://github.com/akashrchandran/spotify-lyrics-api/issues/42

Description

I followed the setup steps:

$ git clone https://github.com/akashrchandran/spotify-lyrics-api.git
$ cd spotify-lyrics-api
$ php -S localhost:8000 api/index.php

And, when pinging an endpoint, The server threw a Failure to open Required file error on this line:

require_once __DIR__ . '/../vendor/autoload.php';

Potential fix

The issue resolved when I changed the line above to:

require_once __DIR__ . '/../src/Spotify.php';
require_once __DIR__ . '/../src/SpotifyException.php';
Originally created by @ryancocuzzo on GitHub (May 12, 2024). Original GitHub issue: https://github.com/akashrchandran/spotify-lyrics-api/issues/42 ## Description I followed the setup steps: ``` $ git clone https://github.com/akashrchandran/spotify-lyrics-api.git $ cd spotify-lyrics-api $ php -S localhost:8000 api/index.php ``` And, when pinging an endpoint, The server threw a `Failure to open Required file` error on this line: ```php require_once __DIR__ . '/../vendor/autoload.php'; ``` ## Potential fix The issue resolved when I changed the line above to: ``` require_once __DIR__ . '/../src/Spotify.php'; require_once __DIR__ . '/../src/SpotifyException.php'; ```
kerem closed this issue 2026-02-27 19:05:24 +03:00
Author
Owner

@akashrchandran commented on GitHub (Jul 2, 2024):

This is for when you're using the API as a package to obtain lyrics. Rather than downloading the repository, you should use Composer to install it.

composer require akashrchandran/spotify-lyrics-api
<!-- gh-comment-id:2201976857 --> @akashrchandran commented on GitHub (Jul 2, 2024): This is for when you're using the API as a package to obtain lyrics. Rather than downloading the repository, you should use Composer to install it. ```bash composer require akashrchandran/spotify-lyrics-api ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-lyrics-api#31
No description provided.