mirror of
https://github.com/koel/koel.git
synced 2026-04-26 09:15:59 +03:00
[GH-ISSUE #483] Upgrade from 3.3.0 to 3.3.1 failed on 'cross-env NODE_ENV=production && gulp --production' #343
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#343
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ShenZhouHong on GitHub (Nov 21, 2016).
Original GitHub issue: https://github.com/koel/koel/issues/483
Hey, thanks for contributing to Koel! To save time for both of us, please make sure these checkboxes are checked before submitting the issue:
All checked? Now also make sure your issue
System Information
npm --versionresults in3.10.8nginx -vresults innginx version: nginx/1.10.1Problem Description
When attempting to upgrade from koel version 3.3.0 to 3.3.1, the following fails on my system:
Expected Behavior
Koel to update successfully
Current Behavior
Koel fails to update
Additional Information
Terminal output at
npm installFilesystem permissions (
ls -al)@ShenZhouHong commented on GitHub (Nov 21, 2016):
Attempted Troubleshooting
This appears to be some sort of permissions error, as it states the operation is not permitted. I attempted to resolve this issue by deleting the contents of node_modules again (
rm -rf node_modules) and rerunning npm install as root.This results in the following output
Result
It appears the upgrade failed at another step in the process, and did not resolve.
@ShenZhouHong commented on GitHub (Nov 24, 2016):
Has anyone else had the same issue? Any solutions?
@gamerlv commented on GitHub (Nov 24, 2016):
Your issue explanation is very detailed, great to see!
Looking through the logs you concluded right that you have an permission issue, however it occurred in your
public/cssfolder and not innode_modulesas you though. Your Koel looks to be installed under the userwww-dataand you tried to update it usingshen.Additionally to that on your second attempt you've hit some bad luck and the re-installation of one dependency failed, which in turn made it fail the frontend update again.
To get things back on track you'll need to execute a few commands. Be sure to copy them precisely, some can, if used wrong, damage your system.
First, go to the folder you installed Koel in:
cd /var/www/hong.io/koel/Clean up the failed dependency installation:
sudo rm -r node_modulesCorrect the permissions in the folder:
sudo chown -Rv www-data:www-data .Reinstall the required dependencies:
sudo -Hu www-data npm installThis last install step should also setup all frontend files, you can check this by reading the output. These two lines followed by no errors should be output:
If that is not the case you can manually trigger a frontend update using the following command:
./node_modules/.bin/cross-env NODE_ENV=production && sudo -Hu www-data ./node_modules/.bin/gulp --production@ShenZhouHong commented on GitHub (Nov 27, 2016):
Hello, @gamerlv
I've followed your instructions as you have kindly shared above, and it appears that I have encountered another error. Here's the output I have received.
Like before this also looks like a permissions issue. However, in this case, I believe I knew the solution. koel was not actually installed as the www-data user, but rather under a newly-created
koeluser specifically for that process. Therefore, when using `sudo -Hu www-data npm install, it (expectedly) did not work as permissions were still incorrect.In order to solve this issue, I merely repeated your commands substituting koel for the user (which is also a group member of www-data, so I left the group unchanged).
This resulted in the expected output.
So, in summery and for future reference:
Make sure that the file and group permissions on your koel installation are correct - and that NPM has access to change and modify the files.
For future users that may be Googling the issue, here are some tips:
ls -alon your koel directory. The user and group permissions should make sense.