[GH-ISSUE #1227] php artisan koel:init was failed #701

Closed
opened 2026-02-26 02:34:00 +03:00 by kerem · 11 comments
Owner

Originally created by @justinushermawan on GitHub (May 21, 2020).
Original GitHub issue: https://github.com/koel/koel/issues/1227

Describe the bug
Im trying to setup koel in my local, but unfortunately when running the last step which is php artisan koel:init, it throws a compiling assets stuff error. It says the resources/assets/js/app.js, ... files were not found, and when I looked up into the resources/assets/js directory, there were only .ts files, no .js files were found.

Screenshots
Screen Shot 2020-05-21 at 23 07 02
Screen Shot 2020-05-21 at 23 13 42

Environment

  • Koel version: 4.3.1
  • OS: macOS Catalina
  • Browser: Chrome 83
  • PHP version: 7.2.31
  • Node version: 12.16.3
Originally created by @justinushermawan on GitHub (May 21, 2020). Original GitHub issue: https://github.com/koel/koel/issues/1227 **Describe the bug** Im trying to setup `koel` in my local, but unfortunately when running the last step which is `php artisan koel:init`, it throws a compiling assets stuff error. It says the `resources/assets/js/app.js, ...` files were not found, and when I looked up into the `resources/assets/js` directory, there were only `.ts` files, no `.js` files were found. **Screenshots** <img width="585" alt="Screen Shot 2020-05-21 at 23 07 02" src="https://user-images.githubusercontent.com/13159271/82579739-6d675e00-9bb8-11ea-837e-ae6cb7cfbf83.png"> <img width="585" alt="Screen Shot 2020-05-21 at 23 13 42" src="https://user-images.githubusercontent.com/13159271/82579966-bb7c6180-9bb8-11ea-86ae-62b66163e51b.png"> **Environment** - Koel version: 4.3.1 - OS: macOS Catalina - Browser: Chrome 83 - PHP version: 7.2.31 - Node version: 12.16.3
kerem 2026-02-26 02:34:00 +03:00
Author
Owner

@BrookeDot commented on GitHub (May 21, 2020):

Can you list the commands that you ran?

What do you get for yarn install? and what version of Yarn?

<!-- gh-comment-id:632239533 --> @BrookeDot commented on GitHub (May 21, 2020): Can you list the commands that you ran? What do you get for `yarn install`? and what version of Yarn?
Author
Owner

@justinushermawan commented on GitHub (May 22, 2020):

git clone --recurse-submodules https://github.com/phanan/koel.git .
git checkout v4.3.1
composer install
php artisan koel:init

Output for yarn install:
Screen Shot 2020-05-22 at 10 00 52

Yarn version: 1.22.4

Is there a problem with laravel-mix?

<!-- gh-comment-id:632451088 --> @justinushermawan commented on GitHub (May 22, 2020): ``` git clone --recurse-submodules https://github.com/phanan/koel.git . git checkout v4.3.1 composer install php artisan koel:init ``` Output for `yarn install`: <img width="585" alt="Screen Shot 2020-05-22 at 10 00 52" src="https://user-images.githubusercontent.com/13159271/82626898-25295980-9c13-11ea-95ba-80cf7e935cca.png"> Yarn version: 1.22.4 Is there a problem with `laravel-mix`?
Author
Owner

@phanan commented on GitHub (May 24, 2020):

There's not .ts file in v4.3.1. It looks like somehow your resources/assets version is latest (which has TS).

<!-- gh-comment-id:633214496 --> @phanan commented on GitHub (May 24, 2020): There's not `.ts` file in v4.3.1. It looks like somehow your `resources/assets` version is latest (which has TS).
Author
Owner

@justinushermawan commented on GitHub (May 24, 2020):

Eventually, I can make it run successfully by cloning the master branch instead and use the latest Node version which is 14.3.0 and after finishing the front-end stuff build, I had to run key:generate and koel:jwt commands manually to make it run with no error.

<!-- gh-comment-id:633218909 --> @justinushermawan commented on GitHub (May 24, 2020): Eventually, I can make it run successfully by cloning the `master` branch instead and use the latest `Node` version which is `14.3.0` and after finishing the front-end stuff build, I had to run `key:generate` and `koel:jwt` commands manually to make it run with no error.
Author
Owner

@BCCC0 commented on GitHub (May 25, 2020):

I ran into the same problem. I solve it by running git submodule update --init --recursive immediately after git checkout v4.3.1, which is suggested in the release page. I guess that a little modification is needed on the installation manual.

<!-- gh-comment-id:633582239 --> @BCCC0 commented on GitHub (May 25, 2020): I ran into the same problem. I solve it by running `git submodule update --init --recursive` immediately after `git checkout v4.3.1`, which is suggested in the release page. I guess that a little modification is needed on the installation manual.
Author
Owner

@r41v3n commented on GitHub (Jun 3, 2020):

Hey @justinushermawan
I have the exact same problem here :( did you solve it??
If you solved it please just let me know.

<!-- gh-comment-id:638165750 --> @r41v3n commented on GitHub (Jun 3, 2020): Hey @justinushermawan I have the exact same problem here :( did you solve it?? If you solved it please just let me know.
Author
Owner

@justinushermawan commented on GitHub (Jun 3, 2020):

Yes, I did. I cloned the master branch instead, and it works successfully.

<!-- gh-comment-id:638176606 --> @justinushermawan commented on GitHub (Jun 3, 2020): Yes, I did. I cloned the master branch instead, and it works successfully.
Author
Owner

@r41v3n commented on GitHub (Jun 3, 2020):

Yes, I did. I cloned the master branch instead, and it works successfully.

I did what you said, but now instead of 2 errors i have 4 errors.
I did clone from master and then run composer install and after that i ran php artisan koel:init
After running php artisan koel:init i got this output ==>>
.
.
.
Now to front-end stuff
├── Installing Node modules in resources/assets directory
yarn install v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.9: The platform "linux" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.1.3: The platform "linux" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 70.27s.
└── Compiling assets
yarn install v1.22.4
[1/4] Resolving packages...
success Already up-to-date.
Done in 1.14s.
yarn run v1.22.4
$ cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js --colors
94% after seal ERROR Failed to compile with 4 errors 6:11:14 PM

These dependencies were not found:

  • /home/behnam/koel-master/resources/assets/js/app.ts in multi ./resources/assets/js/app.ts ./resources/assets/sass/app.scss ./resources/assets/sass/remote.scss
  • /home/behnam/koel-master/resources/assets/js/remote/app.ts in multi ./resources/assets/js/remote/app.ts
  • /home/behnam/koel-master/resources/assets/sass/app.scss in multi ./resources/assets/js/app.ts ./resources/assets/sass/app.scss ./resources/assets/sass/remote.scss
  • /home/behnam/koel-master/resources/assets/sass/remote.scss in multi ./resources/assets/js/app.ts ./resources/assets/sass/app.scss ./resources/assets/sass/remote.scss

To install them, you can run: npm install --save /home/behnam/koel-master/resources/assets/js/app.ts /home/behnam/koel-master/resources/assets/js/remote/app.ts /home/behnam/koel-master/resources/assets/sass/app.scss /home/behnam/koel-master/resources/assets/sass/remote.scss
Error: ENOENT: no such file or directory, stat '/home/behnam/koel-master/resources/assets/img'
at Object.statSync (fs.js:1035:3)
at Object.statSync (/home/behnam/koel-master/node_modules/graceful-fs/polyfills.js:308:16)
at checkStats (/home/behnam/koel-master/node_modules/laravel-mix/node_modules/fs-extra/lib/copy-sync/copy-sync.js:171:22)
at checkPaths (/home/behnam/koel-master/node_modules/laravel-mix/node_modules/fs-extra/lib/copy-sync/copy-sync.js:183:31)
at Object.copySync (/home/behnam/koel-master/node_modules/laravel-mix/node_modules/fs-extra/lib/copy-sync/copy-sync.js:25:20)
at File.copyTo (/home/behnam/koel-master/node_modules/laravel-mix/src/File.js:191:12)
at FileCollection.copyTo (/home/behnam/koel-master/node_modules/laravel-mix/src/FileCollection.js:83:24)
at /home/behnam/koel-master/node_modules/laravel-mix/src/FileCollection.js:77:38
at Array.forEach ()
at FileCollection.copyTo (/home/behnam/koel-master/node_modules/laravel-mix/src/FileCollection.js:77:17)
at CopyFilesTask.run (/home/behnam/koel-master/node_modules/laravel-mix/src/tasks/CopyFilesTask.js:15:20)
at CustomTasksPlugin.runTask (/home/behnam/koel-master/node_modules/laravel-mix/src/webpackPlugins/CustomTasksPlugin.js:36:14)
at /home/behnam/koel-master/node_modules/laravel-mix/src/webpackPlugins/CustomTasksPlugin.js:12:44
at Array.forEach ()
at /home/behnam/koel-master/node_modules/laravel-mix/src/webpackPlugins/CustomTasksPlugin.js:12:23
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/behnam/koel-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), :18:1)
at AsyncSeriesHook.lazyCompileHook (/home/behnam/koel-master/node_modules/tapable/lib/Hook.js:154:20)
at onCompiled (/home/behnam/koel-master/node_modules/webpack/lib/Compiler.js:271:21)
at /home/behnam/koel-master/node_modules/webpack/lib/Compiler.js:681:15
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/behnam/koel-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)
at AsyncSeriesHook.lazyCompileHook (/home/behnam/koel-master/node_modules/tapable/lib/Hook.js:154:20)
at /home/behnam/koel-master/node_modules/webpack/lib/Compiler.js:678:31
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/behnam/koel-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), :9:1)
at AsyncSeriesHook.lazyCompileHook (/home/behnam/koel-master/node_modules/tapable/lib/Hook.js:154:20)
at /home/behnam/koel-master/node_modules/webpack/lib/Compilation.js:1423:35
at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/behnam/koel-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), :9:1)
at AsyncSeriesHook.lazyCompileHook (/home/behnam/koel-master/node_modules/tapable/lib/Hook.js:154:20)
at /home/behnam/koel-master/node_modules/webpack/lib/Compilation.js:1414:32
at eval (eval at create (/home/behnam/koel-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), :19:1)
at processTicksAndRejections (internal/process/task_queues.js:97:5)

error Command failed with exit code 1.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Oops! Koel installation or upgrade didn't finish successfully.
Please try again, or visit https://docs.koel.dev for manual installation.
😥 Sorry for this. You deserve better.

Screenshot
Screenshot_20200603_183415

That was the output please help me if you know why i'm getting this :( Please

<!-- gh-comment-id:638217991 --> @r41v3n commented on GitHub (Jun 3, 2020): > > > Yes, I did. I cloned the master branch instead, and it works successfully. I did what you said, but now instead of 2 errors i have 4 errors. I did clone from master and then run `composer install` and after that i ran `php artisan koel:init` After running `php artisan koel:init` i got this output ==>> . . . Now to front-end stuff ├── Installing Node modules in resources/assets directory yarn install v1.22.4 [1/4] Resolving packages... [2/4] Fetching packages... info fsevents@1.2.9: The platform "linux" is incompatible with this module. info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@2.1.3: The platform "linux" is incompatible with this module. info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... [4/4] Building fresh packages... Done in 70.27s. └── Compiling assets yarn install v1.22.4 [1/4] Resolving packages... success Already up-to-date. Done in 1.14s. yarn run v1.22.4 $ cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js --colors **94% after seal ERROR Failed to compile with 4 errors 6:11:14 PM** **These dependencies were not found:** * /home/behnam/koel-master/resources/assets/js/app.ts in multi ./resources/assets/js/app.ts ./resources/assets/sass/app.scss ./resources/assets/sass/remote.scss * /home/behnam/koel-master/resources/assets/js/remote/app.ts in multi ./resources/assets/js/remote/app.ts * /home/behnam/koel-master/resources/assets/sass/app.scss in multi ./resources/assets/js/app.ts ./resources/assets/sass/app.scss ./resources/assets/sass/remote.scss * /home/behnam/koel-master/resources/assets/sass/remote.scss in multi ./resources/assets/js/app.ts ./resources/assets/sass/app.scss ./resources/assets/sass/remote.scss To install them, you can run: npm install --save /home/behnam/koel-master/resources/assets/js/app.ts /home/behnam/koel-master/resources/assets/js/remote/app.ts /home/behnam/koel-master/resources/assets/sass/app.scss /home/behnam/koel-master/resources/assets/sass/remote.scss Error: ENOENT: no such file or directory, stat '/home/behnam/koel-master/resources/assets/img' at Object.statSync (fs.js:1035:3) at Object.statSync (/home/behnam/koel-master/node_modules/graceful-fs/polyfills.js:308:16) at checkStats (/home/behnam/koel-master/node_modules/laravel-mix/node_modules/fs-extra/lib/copy-sync/copy-sync.js:171:22) at checkPaths (/home/behnam/koel-master/node_modules/laravel-mix/node_modules/fs-extra/lib/copy-sync/copy-sync.js:183:31) at Object.copySync (/home/behnam/koel-master/node_modules/laravel-mix/node_modules/fs-extra/lib/copy-sync/copy-sync.js:25:20) at File.copyTo (/home/behnam/koel-master/node_modules/laravel-mix/src/File.js:191:12) at FileCollection.copyTo (/home/behnam/koel-master/node_modules/laravel-mix/src/FileCollection.js:83:24) at /home/behnam/koel-master/node_modules/laravel-mix/src/FileCollection.js:77:38 at Array.forEach (<anonymous>) at FileCollection.copyTo (/home/behnam/koel-master/node_modules/laravel-mix/src/FileCollection.js:77:17) at CopyFilesTask.run (/home/behnam/koel-master/node_modules/laravel-mix/src/tasks/CopyFilesTask.js:15:20) at CustomTasksPlugin.runTask (/home/behnam/koel-master/node_modules/laravel-mix/src/webpackPlugins/CustomTasksPlugin.js:36:14) at /home/behnam/koel-master/node_modules/laravel-mix/src/webpackPlugins/CustomTasksPlugin.js:12:44 at Array.forEach (<anonymous>) at /home/behnam/koel-master/node_modules/laravel-mix/src/webpackPlugins/CustomTasksPlugin.js:12:23 at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/behnam/koel-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:18:1) at AsyncSeriesHook.lazyCompileHook (/home/behnam/koel-master/node_modules/tapable/lib/Hook.js:154:20) at onCompiled (/home/behnam/koel-master/node_modules/webpack/lib/Compiler.js:271:21) at /home/behnam/koel-master/node_modules/webpack/lib/Compiler.js:681:15 at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/behnam/koel-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1) at AsyncSeriesHook.lazyCompileHook (/home/behnam/koel-master/node_modules/tapable/lib/Hook.js:154:20) at /home/behnam/koel-master/node_modules/webpack/lib/Compiler.js:678:31 at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/behnam/koel-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1) at AsyncSeriesHook.lazyCompileHook (/home/behnam/koel-master/node_modules/tapable/lib/Hook.js:154:20) at /home/behnam/koel-master/node_modules/webpack/lib/Compilation.js:1423:35 at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/behnam/koel-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1) at AsyncSeriesHook.lazyCompileHook (/home/behnam/koel-master/node_modules/tapable/lib/Hook.js:154:20) at /home/behnam/koel-master/node_modules/webpack/lib/Compilation.js:1414:32 at eval (eval at create (/home/behnam/koel-master/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:19:1) at processTicksAndRejections (internal/process/task_queues.js:97:5) **error Command failed with exit code 1.** info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Oops! Koel installation or upgrade didn't finish successfully. Please try again, or visit https://docs.koel.dev for manual installation. 😥 Sorry for this. You deserve better. Screenshot ![Screenshot_20200603_183415](https://user-images.githubusercontent.com/65010996/83646568-a9ab9e80-a568-11ea-8602-05fa8101f1fc.png) That was the output please help me if you know why i'm getting this :( Please
Author
Owner

@justinushermawan commented on GitHub (Jun 3, 2020):

You need --recursive param when cloning the repo, retry the cloning process with this command: git clone --recursive https://github.com/koel/koel.git .

<!-- gh-comment-id:638235236 --> @justinushermawan commented on GitHub (Jun 3, 2020): You need `--recursive` param when cloning the repo, retry the cloning process with this command: `git clone --recursive https://github.com/koel/koel.git .`
Author
Owner

@r41v3n commented on GitHub (Jun 3, 2020):

You need --recursive param when cloning the repo, retry the cloning process with this command: git clone --recursive https://github.com/koel/koel.git .

Thank you :))) Finally after 2 days of trying i'm accually using it.

<!-- gh-comment-id:638261476 --> @r41v3n commented on GitHub (Jun 3, 2020): > > > You need `--recursive` param when cloning the repo, retry the cloning process with this command: `git clone --recursive https://github.com/koel/koel.git .` **Thank you** :))) Finally after 2 days of trying i'm accually using it.
Author
Owner

@justinushermawan commented on GitHub (Jun 3, 2020):

You're welcome, glad to help you.

<!-- gh-comment-id:638266732 --> @justinushermawan commented on GitHub (Jun 3, 2020): You're welcome, glad to help 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#701
No description provided.