[GH-ISSUE #737] Yarn errors - missing dependencies #526

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

Originally created by @gareththered on GitHub (Apr 9, 2018).
Original GitHub issue: https://github.com/koel/koel/issues/737

composer_install_output.txt
I'm attempting to install Koel. I've followed your wiki instructions and failed miserably. I should add that Koel works within Docker (0xcaff's), but I'm not interested in running it from Docker permanently.

I dissected 0xcaff's Dockerfile to see if I could work out where I've gone wrong - I couldn't.

I'm attempting to install Koel v3.7.2 on a Debian 9 VM. The following are the steps I've taken:

~# apt install curl gnupg2 apt-transport-https

Install a newer nodejs and yarn:
~# curl --silent https://deb.nodesource.com/gpgkey/nodesource.gpg.key| apt-key add -
~# echo "deb https://deb.nodesource.com/node_8.x stretch main" | tee /etc/apt/sources.list.d/nodesource.list
~# echo "deb-src https://deb.nodesource.com/node_8.x stretch main" | tee --append /etc/apt/sources.list.d/nodesource.list
~# curl --silent --show-error https://dl.yarnpkg.com/debian/pubkey.gpg| apt-key add -
~# echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list

Install them along with git:
~# apt update && apt install nodejs yarn git

Install more dependencies. This deviates from the Docker steps in that I used apt whereas it used docker-php-ext-install. These aren't listed in the wiki neither, but if I skip these, the composer install fails later
composer_install_output.txt
:
~# apt install libxml2-dev zlib1g-dev libcurl4-openssl-dev php7.0-zip php7.0-mbstring php7.0-curl php7.0-curl php7.0-xml

Install newer composer:
~# curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=1.1.2

All settings correct for using Composer
Downloading...
    
Composer (version 1.1.2) successfully installed to: /usr/local/bin/composer
Use it: php /usr/local/bin/composer

~# chmod +x /usr/local/bin/composer

Download Koel:
~# cd /usr/share
share# git clone https://github.com/phanan/koel.git
share# chown -R www-data: koel
share# cd koel

Change user:
koel# sudo -u www-data bash

Install composer:
koel$ /usr/local/bin/composer install
(I've attached the output to save posting an excessively long issue - there were no errors AFAIK)

Unsuccessfully attempt to install yarn:
koel$ yarn install

yarn install v1.5.1
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.1.2: The platform "linux" is incompatible with this module.
info "fsevents@1.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > @phanan/vuebus@1.0.0" has incorrect peer dependency "vue@^2.5.13".
[4/4] Building fresh packages...
$ yarn production
yarn run v1.5.1
$ 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 '/usr/share/koel/resources/assets/img'
 95% emitting

 ERROR  Failed to compile with 4 errors                                                                                                                                                                                               21:42:28

These dependencies were not found:

* /usr/share/koel/resources/assets/js/app.js in multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./resources/assets/sass/remote.scss
* /usr/share/koel/resources/assets/js/remote/app.js in multi ./resources/assets/js/remote/app.js
* /usr/share/koel/resources/assets/sass/app.scss in multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./resources/assets/sass/remote.scss
* /usr/share/koel/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 /usr/share/koel/resources/assets/js/app.js /usr/share/koel/resources/assets/js/remote/app.js /usr/share/koel/resources/assets/sass/app.scss /usr/share/koel/resources/assets/sass/remote.scss
                                 Asset       Size  Chunks                    Chunk Names
/js/remote/app.d41d8cd98f00b204e980.js  588 bytes       0  [emitted]         /js/remote/app
       /js/app.d41d8cd98f00b204e980.js  785 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.ttf     166 kB          [emitted]         
        fonts/fontawesome-webfont.woff      98 kB          [emitted]         
       fonts/fontawesome-webfont.woff2    77.2 kB          [emitted]         
                 fonts/FontAwesome.otf     135 kB          [emitted]         
error An unexpected error occurred: "Command failed.
Exit code: 2
Command: sh
Arguments: -c cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
Directory: /usr/share/koel
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/usr/share/koel/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c yarn production
Directory: /usr/share/koel
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/usr/share/koel/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

If I follow the advice in the error message:
koel$ npm install --save /usr/share/koel/resources/assets/js/app.js /usr/share/koel/resources/assets/js/remote/app.js /usr/share/koel/resources/assets/sass/app.scss /usr/share/koel/resources/assets/sass/remote.scss
I get:

npm ERR! code ENOLOCAL
npm ERR! Could not install from "resources/assets/js/app.js" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     /var/www/.npm/_logs/2018-04-05T20_47_12_480Z-debug.log

which isn't surprising as ls resource/assets shows an empty directory.

Having never used nodejs or yarn before, I'm at a loss as to how to resolve this. As the missing files are withing the koel directory, I guessed that raising an issue here would be a good place to start.

Originally created by @gareththered on GitHub (Apr 9, 2018). Original GitHub issue: https://github.com/koel/koel/issues/737 [composer_install_output.txt](https://github.com/phanan/koel/files/1888945/composer_install_output.txt) I'm attempting to install Koel. I've followed your wiki instructions and failed miserably. I should add that Koel works within Docker (0xcaff's), but I'm not interested in running it from Docker permanently. I dissected 0xcaff's Dockerfile to see if I could work out where I've gone wrong - I couldn't. I'm attempting to install Koel v3.7.2 on a Debian 9 VM. The following are the steps I've taken: `~# apt install curl gnupg2 apt-transport-https` Install a newer `nodejs` and `yarn`: `~# curl --silent https://deb.nodesource.com/gpgkey/nodesource.gpg.key| apt-key add -` `~# echo "deb https://deb.nodesource.com/node_8.x stretch main" | tee /etc/apt/sources.list.d/nodesource.list` `~# echo "deb-src https://deb.nodesource.com/node_8.x stretch main" | tee --append /etc/apt/sources.list.d/nodesource.list` `~# curl --silent --show-error https://dl.yarnpkg.com/debian/pubkey.gpg| apt-key add -` `~# echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list` Install them along with `git`: `~# apt update && apt install nodejs yarn git` Install more dependencies. This deviates from the Docker steps in that I used `apt` whereas it used `docker-php-ext-install`. These aren't listed in the wiki neither, but if I skip these, the `composer` install fails later [composer_install_output.txt](https://github.com/phanan/koel/files/1888939/composer_install_output.txt) : `~# apt install libxml2-dev zlib1g-dev libcurl4-openssl-dev php7.0-zip php7.0-mbstring php7.0-curl php7.0-curl php7.0-xml` Install newer composer: `~# curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=1.1.2` ``` All settings correct for using Composer Downloading... Composer (version 1.1.2) successfully installed to: /usr/local/bin/composer Use it: php /usr/local/bin/composer ``` `~# chmod +x /usr/local/bin/composer` Download Koel: `~# cd /usr/share` `share# git clone https://github.com/phanan/koel.git` `share# chown -R www-data: koel` `share# cd koel` Change user: `koel# sudo -u www-data bash` Install composer: `koel$ /usr/local/bin/composer install` (I've attached the output to save posting an excessively long issue - there were no errors AFAIK) Unsuccessfully attempt to install yarn: `koel$ yarn install` ``` yarn install v1.5.1 [1/4] Resolving packages... [2/4] Fetching packages... info fsevents@1.1.2: The platform "linux" is incompatible with this module. info "fsevents@1.1.2" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... warning " > @phanan/vuebus@1.0.0" has incorrect peer dependency "vue@^2.5.13". [4/4] Building fresh packages... $ yarn production yarn run v1.5.1 $ 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 '/usr/share/koel/resources/assets/img' 95% emitting ERROR Failed to compile with 4 errors 21:42:28 These dependencies were not found: * /usr/share/koel/resources/assets/js/app.js in multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./resources/assets/sass/remote.scss * /usr/share/koel/resources/assets/js/remote/app.js in multi ./resources/assets/js/remote/app.js * /usr/share/koel/resources/assets/sass/app.scss in multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./resources/assets/sass/remote.scss * /usr/share/koel/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 /usr/share/koel/resources/assets/js/app.js /usr/share/koel/resources/assets/js/remote/app.js /usr/share/koel/resources/assets/sass/app.scss /usr/share/koel/resources/assets/sass/remote.scss Asset Size Chunks Chunk Names /js/remote/app.d41d8cd98f00b204e980.js 588 bytes 0 [emitted] /js/remote/app /js/app.d41d8cd98f00b204e980.js 785 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.ttf 166 kB [emitted] fonts/fontawesome-webfont.woff 98 kB [emitted] fonts/fontawesome-webfont.woff2 77.2 kB [emitted] fonts/FontAwesome.otf 135 kB [emitted] error An unexpected error occurred: "Command failed. Exit code: 2 Command: sh Arguments: -c cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js Directory: /usr/share/koel Output: ". info If you think this is a bug, please open a bug report with the information provided in "/usr/share/koel/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error An unexpected error occurred: "Command failed. Exit code: 1 Command: sh Arguments: -c yarn production Directory: /usr/share/koel Output: ". info If you think this is a bug, please open a bug report with the information provided in "/usr/share/koel/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. ``` If I follow the advice in the error message: `koel$ npm install --save /usr/share/koel/resources/assets/js/app.js /usr/share/koel/resources/assets/js/remote/app.js /usr/share/koel/resources/assets/sass/app.scss /usr/share/koel/resources/assets/sass/remote.scss` I get: ``` npm ERR! code ENOLOCAL npm ERR! Could not install from "resources/assets/js/app.js" as it does not contain a package.json file. npm ERR! A complete log of this run can be found in: npm ERR! /var/www/.npm/_logs/2018-04-05T20_47_12_480Z-debug.log ``` which isn't surprising as `ls resource/assets` shows an empty directory. Having never used nodejs or yarn before, I'm at a loss as to how to resolve this. As the missing files are withing the `koel` directory, I guessed that raising an issue here would be a good place to start.
kerem closed this issue 2026-02-26 02:33:28 +03:00
Author
Owner

@Diagamma commented on GitHub (Apr 14, 2018):

I had the same problem, apparently in the master branch assets are in a separate repo.
Cloning the repo recursively (git clone https://github.com/phanan/koel.git --recursive) should fix it.

<!-- gh-comment-id:381296333 --> @Diagamma commented on GitHub (Apr 14, 2018): I had the same problem, [apparently](https://github.com/phanan/koel/commit/7292b9472434f1f6e54c20bffc206f60575139a5) in the master branch assets are in a [separate repo](https://github.com/koel/core). Cloning the repo recursively (`git clone https://github.com/phanan/koel.git --recursive`) should fix it.
Author
Owner

@gareththered commented on GitHub (Apr 14, 2018):

@Diagamma - you're a genius. It works perfectly with that addition.

<!-- gh-comment-id:381306924 --> @gareththered commented on GitHub (Apr 14, 2018): @Diagamma - you're a genius. It works perfectly with that addition.
Author
Owner

@phanan commented on GitHub (Apr 14, 2018):

But you specified that you were "attempting to install Koel v3.7.2 on a Debian 9 VM," and not master. Please keep in mind that master branch is unstable.

<!-- gh-comment-id:381317599 --> @phanan commented on GitHub (Apr 14, 2018): But you specified that you were "attempting to install Koel v3.7.2 on a Debian 9 VM," and not `master`. Please keep in mind that `master` branch is unstable.
Author
Owner

@chery5211 commented on GitHub (Sep 20, 2019):

@Diagamma handsome. thank you

<!-- gh-comment-id:533487555 --> @chery5211 commented on GitHub (Sep 20, 2019): @Diagamma handsome. thank you
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#526
No description provided.