Unmanic / unmanic

Unmanic - Library Optimiser
GNU General Public License v3.0
1.43k stars 84 forks source link

Installation failure #217

Closed swetoast closed 2 years ago

swetoast commented 2 years ago

when running python3 ./setup.py install --user it fails seens that its missing /home/toast/unmanic-0.1.0/build/lib/unmanic/webserver/frontend/package.json

running install_lib
running build_py
running write-build-version
running build-frontend
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/toast/unmanic-0.1.0/build/lib/unmanic/webserver/frontend/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/toast/unmanic-0.1.0/build/lib/unmanic/webserver/frontend/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/toast/.npm/_logs/2021-09-18T12_35_29_822Z-debug.log
Traceback (most recent call last):
  File "./setup.py", line 179, in <module>
    setup(
  File "/usr/local/lib/python3.8/dist-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.8/dist-packages/setuptools/command/install.py", line 67, in run
    self.do_egg_install()
  File "/usr/local/lib/python3.8/dist-packages/setuptools/command/install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.8/dist-packages/setuptools/command/bdist_egg.py", line 164, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/usr/local/lib/python3.8/dist-packages/setuptools/command/bdist_egg.py", line 150, in call_command
    self.run_command(cmdname)
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.8/dist-packages/setuptools/command/install_lib.py", line 11, in run
    self.build()
  File "/usr/lib/python3.8/distutils/command/install_lib.py", line 107, in build
    self.run_command('build_py')
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "./setup.py", line 76, in run
    self.run_command('build-frontend')
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "./setup.py", line 108, in run
    subprocess.run(
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['npm', '--prefix', './build/lib/unmanic/webserver/frontend', 'install']' returned non-zero exit status 254.
swetoast commented 2 years ago

Python 3.8.10 pip 21.2.4 npm 7.24.0

incase this is of any help :)

martadinata666 commented 2 years ago

clone with recursive git clone --recursive. if you get permission denied i got this err. Or manually clone the frontend to unmanic/webserver/frontend folder.

Josh5 commented 2 years ago

Thanks @martadinata666

Yea, you need to also clone the submodule.

I'll update the docs to reflect this.

Josh5 commented 2 years ago

Updated docs with commit fa1acfc

swetoast commented 2 years ago

reopening due to frontend not being able to check out when running git submodule update --init --recursive

Submodule 'unmanic/webserver/frontend' (git@github.com:Unmanic/unmanic-frontend.git) registered for path 'unmanic/webserver/frontend'
Cloning into '/home/toast/unmanic/unmanic/webserver/frontend'...
Warning: Permanently added the RSA host key for IP address '140.82.113.3' to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:Unmanic/unmanic-frontend.git' into submodule path '/home/toast/unmanic/unmanic/webserver/frontend' failed
Failed to clone 'unmanic/webserver/frontend'. Retry scheduled
Cloning into '/home/toast/unmanic/unmanic/webserver/frontend'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:Unmanic/unmanic-frontend.git' into submodule path '/home/toast/unmanic/unmanic/webserver/frontend' failed
Failed to clone 'unmanic/webserver/frontend' a second time, aborting
martadinata666 commented 2 years ago

You can manually clone the frontend by

git clone https://github.com/Unmanic/unmanic-frontend.git /home/toast/unmanic/unmanic/webserver/frontend 
swetoast commented 2 years ago

yeah i know i can do that but im not thinking about just me :) want this to work for every user that decides to install manually, plus its always good for the developer to know there is an issue

Josh5 commented 2 years ago

Also manually cloning the project is not right. I actually never noticed that adding a submodule with ssh commits that in the repo. TIL. I've changed it to https in commit 8c19029

swetoast commented 2 years ago

Looking forward to a new release :)

Josh5 commented 2 years ago

Closing again as this is now updated in master