[GH-ISSUE #1301] php artisan init command fails #750

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

Originally created by @navjotjsingh on GitHub (Apr 5, 2021).
Original GitHub issue: https://github.com/koel/koel/issues/1301

Describe the bug
php artisan koel:init command doesn't finish.

To reproduce
Steps to reproduce the behavior:

  1. git clone --recurse-submodules https://github.com/koel/koel.git .
  2. git checkout latest
  3. composer install
  4. php artisan koel:init
  5. Error appears.

Expected behavior
Command should successfully complete.

Screenshots
Here is the entire log.

Attempting to install or upgrade Koel.
Remember, you can always install/upgrade manually following the guide here:
📙  https://docs.koel.dev

Generating app key
Migrating database
Data seeded -- skipping
Now to front-end stuff
├── Installing Node modules in resources/assets directory
yarn install v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
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.
info fsevents@1.1.3: The platform "linux" is incompatible with this module.
info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > @phanan/vuebus@3.0.1" has incorrect peer dependency "vue@^2.6.11".
warning " > eslint-config-vue@2.0.2" has incorrect peer dependency "eslint@^2.0.0 || ^3.0.0".
warning " > eslint-config-vue@2.0.2" has incorrect peer dependency "eslint-plugin-vue@^1.0.0 || ^2.0.0".
[4/4] Building fresh packages...
error /var/www/koel/resources/assets/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: /var/www/koel/resources/assets/node_modules/node-sass
Output:
Building: /usr/bin/node /var/www/koel/resources/assets/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   '/usr/bin/node',
gyp verb cli   '/var/www/koel/resources/assets/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library='
gyp verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@14.16.0 | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/var/www/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/var/www/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/var/www/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /var/www/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:89:16
gyp verb `which` failed     at /var/www/koel/resources/assets/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /var/www/koel/resources/assets/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:183:21)
gyp verb `which` failed  python2 Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/var/www/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/var/www/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/var/www/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /var/www/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:89:16
gyp verb `which` failed     at /var/www/koel/resources/assets/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /var/www/koel/resources/assets/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:183:21) {
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python /usr/bin/python
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                       ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:308:12)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at maybeClose (internal/child_process.js:1048:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
gyp ERR! System Linux 5.8.15-301.fc33.x86_64
gyp ERR! command "/usr/bin/node" "/var/www/koel/resources/assets/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /var/www/koel/resources/assets/node_modules/node-sass
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
info Visit https://yarnpkg.com/en/docs/cli/install 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.

Environment

  • Koel version v5.0.2
  • OS: Fedora 33
  • Browser Firefox 87
  • PHP version 7.4.16
  • Node version v14.16.0
  • Yarn version 1.22.10
Originally created by @navjotjsingh on GitHub (Apr 5, 2021). Original GitHub issue: https://github.com/koel/koel/issues/1301 **Describe the bug** php artisan koel:init command doesn't finish. **To reproduce** Steps to reproduce the behavior: 1. git clone --recurse-submodules https://github.com/koel/koel.git . 2. git checkout latest 3. composer install 4. php artisan koel:init 5. Error appears. **Expected behavior** Command should successfully complete. **Screenshots** Here is the entire log. ``` Attempting to install or upgrade Koel. Remember, you can always install/upgrade manually following the guide here: 📙 https://docs.koel.dev Generating app key Migrating database Data seeded -- skipping Now to front-end stuff ├── Installing Node modules in resources/assets directory yarn install v1.22.10 [1/4] Resolving packages... [2/4] Fetching packages... 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. info fsevents@1.1.3: The platform "linux" is incompatible with this module. info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... warning " > @phanan/vuebus@3.0.1" has incorrect peer dependency "vue@^2.6.11". warning " > eslint-config-vue@2.0.2" has incorrect peer dependency "eslint@^2.0.0 || ^3.0.0". warning " > eslint-config-vue@2.0.2" has incorrect peer dependency "eslint-plugin-vue@^1.0.0 || ^2.0.0". [4/4] Building fresh packages... error /var/www/koel/resources/assets/node_modules/node-sass: Command failed. Exit code: 1 Command: node scripts/build.js Arguments: Directory: /var/www/koel/resources/assets/node_modules/node-sass Output: Building: /usr/bin/node /var/www/koel/resources/assets/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= gyp info it worked if it ends with ok gyp verb cli [ gyp verb cli '/usr/bin/node', gyp verb cli '/var/www/koel/resources/assets/node_modules/node-gyp/bin/node-gyp.js', gyp verb cli 'rebuild', gyp verb cli '--verbose', gyp verb cli '--libsass_ext=', gyp verb cli '--libsass_cflags=', gyp verb cli '--libsass_ldflags=', gyp verb cli '--libsass_library=' gyp verb cli ] gyp info using node-gyp@3.8.0 gyp info using node@14.16.0 | linux | x64 gyp verb command rebuild [] gyp verb command clean [] gyp verb clean removing "build" directory gyp verb command configure [] gyp verb check python checking for Python executable "python2" in the PATH gyp verb `which` failed Error: not found: python2 gyp verb `which` failed at getNotFoundError (/var/www/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:13:12) gyp verb `which` failed at F (/var/www/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:68:19) gyp verb `which` failed at E (/var/www/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:80:29) gyp verb `which` failed at /var/www/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:89:16 gyp verb `which` failed at /var/www/koel/resources/assets/node_modules/isexe/index.js:42:5 gyp verb `which` failed at /var/www/koel/resources/assets/node_modules/isexe/mode.js:8:5 gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:183:21) gyp verb `which` failed python2 Error: not found: python2 gyp verb `which` failed at getNotFoundError (/var/www/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:13:12) gyp verb `which` failed at F (/var/www/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:68:19) gyp verb `which` failed at E (/var/www/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:80:29) gyp verb `which` failed at /var/www/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:89:16 gyp verb `which` failed at /var/www/koel/resources/assets/node_modules/isexe/index.js:42:5 gyp verb `which` failed at /var/www/koel/resources/assets/node_modules/isexe/mode.js:8:5 gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:183:21) { gyp verb `which` failed code: 'ENOENT' gyp verb `which` failed } gyp verb check python checking for Python executable "python" in the PATH gyp verb `which` succeeded python /usr/bin/python gyp ERR! configure error gyp ERR! stack Error: Command failed: /usr/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack File "<string>", line 1 gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack ^ gyp ERR! stack SyntaxError: invalid syntax gyp ERR! stack gyp ERR! stack at ChildProcess.exithandler (child_process.js:308:12) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at maybeClose (internal/child_process.js:1048:16) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) gyp ERR! System Linux 5.8.15-301.fc33.x86_64 gyp ERR! command "/usr/bin/node" "/var/www/koel/resources/assets/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd /var/www/koel/resources/assets/node_modules/node-sass gyp ERR! node -v v14.16.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1 info Visit https://yarnpkg.com/en/docs/cli/install 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. ``` **Environment** - Koel version v5.0.2 - OS: Fedora 33 - Browser Firefox 87 - PHP version 7.4.16 - Node version v14.16.0 - Yarn version 1.22.10
Author
Owner

@navjotjsingh commented on GitHub (Apr 5, 2021):

Looks like the version of node-sass packaged is 4.13.1 which is incompatible with Node 14.

<!-- gh-comment-id:813129025 --> @navjotjsingh commented on GitHub (Apr 5, 2021): Looks like the version of node-sass packaged is 4.13.1 which is incompatible with Node 14.
Author
Owner

@rburchell commented on GitHub (Apr 19, 2021):

See https://github.com/koel/core/pull/55 for a potential fix.

<!-- gh-comment-id:822465954 --> @rburchell commented on GitHub (Apr 19, 2021): See https://github.com/koel/core/pull/55 for a potential fix.
Author
Owner

@kazukyakayashi commented on GitHub (Jul 6, 2022):

Hello same issue here when i try upgrade Koel v5.1.8 to 5.1.14

Debian 11
Python 3
NodeJS v16.15.1
Yarn v1.22.19
Php 7.4

gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (/home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:89:16
gyp verb `which` failed     at /home/debian/koel/resources/assets/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /home/debian/koel/resources/assets/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21)
gyp verb `which` failed  python Error: not found: python
gyp verb `which` failed     at getNotFoundError (/home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:89:16
gyp verb `which` failed     at /home/debian/koel/resources/assets/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /home/debian/koel/resources/assets/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21) {
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (/home/debian/koel/resources/assets/node_modules/node-gyp/lib/configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/home/debian/koel/resources/assets/node_modules/node-gyp/lib/configure.js:406:16)
gyp ERR! stack     at F (/home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:68:16)
gyp ERR! stack     at E (/home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:80:29)
gyp ERR! stack     at /home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:89:16
gyp ERR! stack     at /home/debian/koel/resources/assets/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /home/debian/koel/resources/assets/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:198:21)
gyp ERR! System Linux 5.10.0-15-amd64
gyp ERR! command "/usr/bin/node" "/home/debian/koel/resources/assets/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/debian/koel/resources/assets/node_modules/node-sass
gyp ERR! node -v v16.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
info Visit https://yarnpkg.com/en/docs/cli/install 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.
<!-- gh-comment-id:1176168143 --> @kazukyakayashi commented on GitHub (Jul 6, 2022): Hello same issue here when i try upgrade Koel v5.1.8 to 5.1.14 Debian 11 Python 3 NodeJS v16.15.1 Yarn v1.22.19 Php 7.4 ``` gyp verb check python checking for Python executable "python" in the PATH gyp verb `which` failed Error: not found: python gyp verb `which` failed at getNotFoundError (/home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:13:12) gyp verb `which` failed at F (/home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:68:19) gyp verb `which` failed at E (/home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:80:29) gyp verb `which` failed at /home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:89:16 gyp verb `which` failed at /home/debian/koel/resources/assets/node_modules/isexe/index.js:42:5 gyp verb `which` failed at /home/debian/koel/resources/assets/node_modules/isexe/mode.js:8:5 gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) gyp verb `which` failed python Error: not found: python gyp verb `which` failed at getNotFoundError (/home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:13:12) gyp verb `which` failed at F (/home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:68:19) gyp verb `which` failed at E (/home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:80:29) gyp verb `which` failed at /home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:89:16 gyp verb `which` failed at /home/debian/koel/resources/assets/node_modules/isexe/index.js:42:5 gyp verb `which` failed at /home/debian/koel/resources/assets/node_modules/isexe/mode.js:8:5 gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) { gyp verb `which` failed code: 'ENOENT' gyp verb `which` failed } gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at PythonFinder.failNoPython (/home/debian/koel/resources/assets/node_modules/node-gyp/lib/configure.js:484:19) gyp ERR! stack at PythonFinder.<anonymous> (/home/debian/koel/resources/assets/node_modules/node-gyp/lib/configure.js:406:16) gyp ERR! stack at F (/home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:68:16) gyp ERR! stack at E (/home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:80:29) gyp ERR! stack at /home/debian/koel/resources/assets/node_modules/node-gyp/node_modules/which/which.js:89:16 gyp ERR! stack at /home/debian/koel/resources/assets/node_modules/isexe/index.js:42:5 gyp ERR! stack at /home/debian/koel/resources/assets/node_modules/isexe/mode.js:8:5 gyp ERR! stack at FSReqCallback.oncomplete (node:fs:198:21) gyp ERR! System Linux 5.10.0-15-amd64 gyp ERR! command "/usr/bin/node" "/home/debian/koel/resources/assets/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd /home/debian/koel/resources/assets/node_modules/node-sass gyp ERR! node -v v16.15.1 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1 info Visit https://yarnpkg.com/en/docs/cli/install 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. ```
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#750
No description provided.