[GH-ISSUE #763] Koel:init issue on ubuntu 16.04 #551

Closed
opened 2026-02-26 02:33:31 +03:00 by kerem · 7 comments
Owner

Originally created by @drastic082 on GitHub (Jul 12, 2018).
Original GitHub issue: https://github.com/koel/koel/issues/763

Hello,
I've been trying to get Koel installed. I've managed to get most of the installation done but I can't seem to get the very last part to work.
I'm on ubuntu 16.04
Node v8.11.3
yarn v0.25.4 (I read somewhere that downgrading to this version would fix my problem)
npm version 5.6.0
PHP version 7

This is the error I get:

eastern@HydraStream:/var/www/html$ sudo php artisan koel:init
Attempting to install or upgrade Koel.
Remember, you can always install/upgrade manually following the guide here:
📙 https://koel.phanan.net/docs

App key exists -- skipping
JWT secret exists -- skipping
Migrating database
Data seeded -- skipping
The absolute path to your media directory. If this is skipped (left blank) now, you can set it later via the web interface.

Media path []:

Compiling front-end stuff
yarn install v0.25.4
[1/4] Resolving packages...
success Already up-to-date.
$ yarn production
yarn production v0.25.4
$ cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
94% asset optimization[copy-webpack-plugin] WARNING - unable to locate 'resources/assets/img' at '/var/www/html/resources/assets/img'
95% emitting ERROR Failed to compile with 4 errors10:23:09

These dependencies were not found:

  • /var/www/html/resources/assets/js/app.js in multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./resources/assets/sass/remote.scss
  • /var/www/html/resources/assets/js/remote/app.js in multi ./resources/assets/js/remote/app.js
  • /var/www/html/resources/assets/sass/app.scss in multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./resources/assets/sass/remote.scss
  • /var/www/html/resources/assets/sass/remote.scss in multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./resources/assets/sass/remote.scss

To install them, you can run: npm install --save /var/www/html/resources/assets/js/app.js /var/www/html/resources/assets/js/remote/app.js /var/www/html/resources/assets/sass/app.scss /var/www/html/resources/assets/sass/remote.scss
Asset Size Chunks Chunk Names
/js/remote/app.d41d8cd98f00b204e980.js 586 bytes 0 [emitted] /js/remote/app
/js/app.d41d8cd98f00b204e980.js 779 bytes 1 [emitted] /js/app
mix-manifest.json 118 bytes [emitted]
fonts/fontawesome-webfont.eot 166 kB [emitted]
fonts/fontawesome-webfont.svg 444 kB [emitted] [big]
fonts/fontawesome-webfont.woff 98 kB [emitted]
fonts/fontawesome-webfont.ttf 166 kB [emitted]
fonts/fontawesome-webfont.woff2 77.2 kB [emitted]
fonts/FontAwesome.otf 135 kB [emitted]
error Command failed with exit code 2.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

🎆 Success! Koel can now be run from localhost with php artisan serve.
Again, for more configuration guidance, refer to
📙 https://koel.phanan.net/docs
or open the .env file in the root installation folder.
Thanks for using Koel. You rock!

I did notice looking up my yarn version by running "yarn -v" I get this error message:
yarn install v0.25.4
[1/4] Resolving packages...
success Already up-to-date.
$ yarn production
yarn production v0.25.4
$ cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
94% asset optimization[copy-webpack-plugin] WARNING - unable to locate 'resources/assets/img' at '/var/www/html/resources/assets/img'
95% emittingError: EACCES: permission denied, open '/var/www/html/public/mix-manifest.json'
error Command failed with exit code 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Can someone point me in the right direction, is my yarn install at fault? When I navigate to the assets folder specified in the error, it's empty.

Originally created by @drastic082 on GitHub (Jul 12, 2018). Original GitHub issue: https://github.com/koel/koel/issues/763 Hello, I've been trying to get Koel installed. I've managed to get most of the installation done but I can't seem to get the very last part to work. I'm on ubuntu 16.04 Node v8.11.3 yarn v0.25.4 (I read somewhere that downgrading to this version would fix my problem) npm version 5.6.0 PHP version 7 This is the error I get: ----------------------------------------------------------------------------------------------- eastern@HydraStream:/var/www/html$ sudo php artisan koel:init Attempting to install or upgrade Koel. Remember, you can always install/upgrade manually following the guide here: 📙 https://koel.phanan.net/docs App key exists -- skipping JWT secret exists -- skipping Migrating database Data seeded -- skipping The absolute path to your media directory. If this is skipped (left blank) now, you can set it later via the web interface. Media path []: > Compiling front-end stuff yarn install v0.25.4 [1/4] Resolving packages... success Already up-to-date. $ yarn production yarn production v0.25.4 $ cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js 94% asset optimization[copy-webpack-plugin] WARNING - unable to locate 'resources/assets/img' at '/var/www/html/resources/assets/img' 95% emitting ERROR Failed to compile with 4 errors10:23:09 These dependencies were not found: * /var/www/html/resources/assets/js/app.js in multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./resources/assets/sass/remote.scss * /var/www/html/resources/assets/js/remote/app.js in multi ./resources/assets/js/remote/app.js * /var/www/html/resources/assets/sass/app.scss in multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./resources/assets/sass/remote.scss * /var/www/html/resources/assets/sass/remote.scss in multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./resources/assets/sass/remote.scss To install them, you can run: npm install --save /var/www/html/resources/assets/js/app.js /var/www/html/resources/assets/js/remote/app.js /var/www/html/resources/assets/sass/app.scss /var/www/html/resources/assets/sass/remote.scss Asset Size Chunks Chunk Names /js/remote/app.d41d8cd98f00b204e980.js 586 bytes 0 [emitted] /js/remote/app /js/app.d41d8cd98f00b204e980.js 779 bytes 1 [emitted] /js/app mix-manifest.json 118 bytes [emitted] fonts/fontawesome-webfont.eot 166 kB [emitted] fonts/fontawesome-webfont.svg 444 kB [emitted] [big] fonts/fontawesome-webfont.woff 98 kB [emitted] fonts/fontawesome-webfont.ttf 166 kB [emitted] fonts/fontawesome-webfont.woff2 77.2 kB [emitted] fonts/FontAwesome.otf 135 kB [emitted] error Command failed with exit code 2. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. 🎆 Success! Koel can now be run from localhost with `php artisan serve`. Again, for more configuration guidance, refer to 📙 https://koel.phanan.net/docs or open the .env file in the root installation folder. Thanks for using Koel. You rock! -------------------------------------------------------------------------------------------------- I did notice looking up my yarn version by running "yarn -v" I get this error message: yarn install v0.25.4 [1/4] Resolving packages... success Already up-to-date. $ yarn production yarn production v0.25.4 $ cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js 94% asset optimization[copy-webpack-plugin] WARNING - unable to locate 'resources/assets/img' at '/var/www/html/resources/assets/img' 95% emittingError: EACCES: permission denied, open '/var/www/html/public/mix-manifest.json' error Command failed with exit code 1. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. Can someone point me in the right direction, is my yarn install at fault? When I navigate to the assets folder specified in the error, it's empty.
kerem closed this issue 2026-02-26 02:33:31 +03:00
Author
Owner

@gamerlv commented on GitHub (Jul 17, 2018):

How did you acquire the source code for Koel, maybe clone the git repository but not switch to the release tag with git checkout v3.7.2?

In the current master branch the folder resources/assets is actually a submodule, not a normal folder like in the release tag.
If you do wish to use the master branch you will need to acquire the submodule. That can be done with the command git submodule init. Afterwards you would need to rerun the yarn tasks. yarn production

<!-- gh-comment-id:405418641 --> @gamerlv commented on GitHub (Jul 17, 2018): How did you acquire the source code for Koel, maybe clone the git repository but not switch to the release tag with `git checkout v3.7.2`? In the current master branch the folder `resources/assets` is actually a [submodule](https://git-scm.com/docs/git-submodule), not a normal folder like in the release tag. If you do wish to use the _master_ branch you will need to acquire the submodule. That can be done with the command `git submodule init`. Afterwards you would need to rerun the _yarn_ tasks. `yarn production`
Author
Owner

@phanan commented on GitHub (Jul 19, 2018):

Thanks @gamerlv for explaining :)

<!-- gh-comment-id:406384074 --> @phanan commented on GitHub (Jul 19, 2018): Thanks @gamerlv for explaining :)
Author
Owner

@drastic082 commented on GitHub (Jul 25, 2018):

great. That worked. Thank You

<!-- gh-comment-id:407855253 --> @drastic082 commented on GitHub (Jul 25, 2018): great. That worked. Thank You
Author
Owner

@drastic082 commented on GitHub (Jul 25, 2018):

I celebrated too early. I am able to see the site when I type in the ip address but I cant log in. It's not taking my password. I doublechecked my .env file and it seems right. Is there a way to verify that I'm looking at the right .env file?

<!-- gh-comment-id:407859819 --> @drastic082 commented on GitHub (Jul 25, 2018): I celebrated too early. I am able to see the site when I type in the ip address but I cant log in. It's not taking my password. I doublechecked my .env file and it seems right. Is there a way to verify that I'm looking at the right .env file?
Author
Owner

@gamerlv commented on GitHub (Jul 25, 2018):

Koel will use the .env file in the base folder. In the same folder are the files "composer.json" and "artisan".
The logins details you are looking for are not in the .env file. The first time you ran koel:init it asked you for admin details. Those are your login credentials.

If you do not remember those details and want to keep the current database I'm not entirely sure what path to recommend. The only place Koel has code to create an admin account is in the init command. However, if you are oke with destroying all data in your current koel database you can run the command php ./artisan migrate:reset to remove the database. Then follow that with the command php ./artisan koel:init.

<!-- gh-comment-id:407933329 --> @gamerlv commented on GitHub (Jul 25, 2018): Koel will use the .env file in the base folder. In the same folder are the files "composer.json" and "artisan". The logins details you are looking for are not in the .env file. The first time you ran `koel:init` it asked you for admin details. Those are your login credentials. If you do not remember those details and want to keep the current database I'm not entirely sure what path to recommend. The only place Koel has code to create an admin account is in the init command. However, if you are oke with **destroying all data** in your current koel database you can run the command `php ./artisan migrate:reset` to remove the database. Then follow that with the command `php ./artisan koel:init`.
Author
Owner

@drastic082 commented on GitHub (Jul 26, 2018):

I dont think I was ever asked to input an email and password when I ran koel:init.

I followed your suggestion and this is what I got:


eastern@HydraStream:/var/www/html$ sudo php ./artisan migrate:reset


  • Application In Production!     *
    

Do you really wish to run this command? (yes/no) [no]:

yes

In Connection.php line 647:

SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'songs_contributing_artist_id_foreign'; check that column/key exists (SQL: alt
er table songs drop foreign key songs_contributing_artist_id_foreign)

In PDOStatement.php line 107:

SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'songs_contributing_artist_id_foreign'; check that column/key exists

In PDOStatement.php line 105:

SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'songs_contributing_artist_id_foreign'; check that column/key exists

eastern@HydraStream:/var/www/html$ sudo php ./artisan koel:init
Attempting to install or upgrade Koel.
Remember, you can always install/upgrade manually following the guide here:
📙 https://koel.phanan.net/docs

App key exists -- skipping
JWT secret exists -- skipping
Migrating database
Data seeded -- skipping
The absolute path to your media directory. If this is skipped (left blank) now, you can set it later via the web interface.

Media path []:

Compiling front-end stuff
yarn install v0.25.4
[1/4] Resolving packages...
success Already up-to-date.
$ yarn production
yarn production v0.25.4
$ cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
95% emitting DONE Compiled successfully in 27125ms10:17:30

                                                       Asset       Size  Chunks                    Chunk Names
                                                img/bars.gif    33.2 kB          [emitted]         

fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713 166 kB [emitted]
fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad 98 kB [emitted]
fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9 166 kB [emitted]
fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde 444 kB [emitted] [big]
fonts/logo.svg?8a2f5cec8d12d85f91ae82ef106ecb28 5.19 kB [emitted]
images/unknown-album.png?873e048b5722632f6f0b8c0120307829 11.5 kB [emitted]
/js/app.981b4a78a7b90e2d68a1.js 789 kB 0 [emitted] [big] /js/app
/js/remote/app.90afab5c973e242565d5.js 539 kB 1 [emitted] [big] /js/remote/app
/css/app.29d0ddb4222df408fee0.css 19.3 kB 0 [emitted] /js/app
/css/remote.29d0ddb4222df408fee0.css 40 bytes 0 [emitted] /js/app
mix-manifest.json 234 bytes [emitted]
img/artists/.gitkeep 0 bytes [emitted]
img/covers/unknown-album.png 11.5 kB [emitted]
fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e 77.2 kB [emitted]
img/favicon.ico 4.29 kB [emitted]
img/logo.svg 5.19 kB [emitted]
img/itunes.svg 1.54 kB [emitted]
img/icon.png 10.8 kB [emitted]
img/logo.png 9.28 kB [emitted]
img/tile-wide.png 3.25 kB [emitted]
img/tile.png 6.47 kB [emitted]
fonts/fontawesome-webfont.eot 166 kB [emitted]
fonts/fontawesome-webfont.svg 444 kB [emitted] [big]
fonts/fontawesome-webfont.woff 98 kB [emitted]
fonts/fontawesome-webfont.ttf 166 kB [emitted]
fonts/fontawesome-webfont.woff2 77.2 kB [emitted]
fonts/FontAwesome.otf 135 kB [emitted]
Done in 29.45s.
Done in 30.99s.

🎆 Success! Koel can now be run from localhost with php artisan serve.
Again, for more configuration guidance, refer to
📙 https://koel.phanan.net/docs
or open the .env file in the root installation folder.
Thanks for using Koel. You rock!
eastern@HydraStream:/var/www/html$

At the end I wasnt asked for credentials.

<!-- gh-comment-id:408114645 --> @drastic082 commented on GitHub (Jul 26, 2018): I dont think I was ever asked to input an email and password when I ran koel:init. I followed your suggestion and this is what I got: ------------------------------------------------------- eastern@HydraStream:/var/www/html$ sudo php ./artisan migrate:reset ************************************** * Application In Production! * ************************************** Do you really wish to run this command? (yes/no) [no]: > yes In Connection.php line 647: SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'songs_contributing_artist_id_foreign'; check that column/key exists (SQL: alt er table `songs` drop foreign key `songs_contributing_artist_id_foreign`) In PDOStatement.php line 107: SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'songs_contributing_artist_id_foreign'; check that column/key exists In PDOStatement.php line 105: SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'songs_contributing_artist_id_foreign'; check that column/key exists eastern@HydraStream:/var/www/html$ sudo php ./artisan koel:init Attempting to install or upgrade Koel. Remember, you can always install/upgrade manually following the guide here: 📙 https://koel.phanan.net/docs App key exists -- skipping JWT secret exists -- skipping Migrating database Data seeded -- skipping The absolute path to your media directory. If this is skipped (left blank) now, you can set it later via the web interface. Media path []: > Compiling front-end stuff yarn install v0.25.4 [1/4] Resolving packages... success Already up-to-date. $ yarn production yarn production v0.25.4 $ cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js 95% emitting DONE Compiled successfully in 27125ms10:17:30 Asset Size Chunks Chunk Names img/bars.gif 33.2 kB [emitted] fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713 166 kB [emitted] fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad 98 kB [emitted] fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9 166 kB [emitted] fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde 444 kB [emitted] [big] fonts/logo.svg?8a2f5cec8d12d85f91ae82ef106ecb28 5.19 kB [emitted] images/unknown-album.png?873e048b5722632f6f0b8c0120307829 11.5 kB [emitted] /js/app.981b4a78a7b90e2d68a1.js 789 kB 0 [emitted] [big] /js/app /js/remote/app.90afab5c973e242565d5.js 539 kB 1 [emitted] [big] /js/remote/app /css/app.29d0ddb4222df408fee0.css 19.3 kB 0 [emitted] /js/app /css/remote.29d0ddb4222df408fee0.css 40 bytes 0 [emitted] /js/app mix-manifest.json 234 bytes [emitted] img/artists/.gitkeep 0 bytes [emitted] img/covers/unknown-album.png 11.5 kB [emitted] fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e 77.2 kB [emitted] img/favicon.ico 4.29 kB [emitted] img/logo.svg 5.19 kB [emitted] img/itunes.svg 1.54 kB [emitted] img/icon.png 10.8 kB [emitted] img/logo.png 9.28 kB [emitted] img/tile-wide.png 3.25 kB [emitted] img/tile.png 6.47 kB [emitted] fonts/fontawesome-webfont.eot 166 kB [emitted] fonts/fontawesome-webfont.svg 444 kB [emitted] [big] fonts/fontawesome-webfont.woff 98 kB [emitted] fonts/fontawesome-webfont.ttf 166 kB [emitted] fonts/fontawesome-webfont.woff2 77.2 kB [emitted] fonts/FontAwesome.otf 135 kB [emitted] Done in 29.45s. Done in 30.99s. 🎆 Success! Koel can now be run from localhost with `php artisan serve`. Again, for more configuration guidance, refer to 📙 https://koel.phanan.net/docs or open the .env file in the root installation folder. Thanks for using Koel. You rock! eastern@HydraStream:/var/www/html$ -------------------------------------------------------------------------------------- At the end I wasnt asked for credentials.
Author
Owner

@drastic082 commented on GitHub (Jul 31, 2018):

any thoughts?

<!-- gh-comment-id:409272845 --> @drastic082 commented on GitHub (Jul 31, 2018): any thoughts?
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/koel-koel#551
No description provided.