name collision with other livereload package => ImportError: cannot import name 'livereload_port' from 'livereload'
floer32 opened this issue · 0 comments
floer32 commented
No help needed, I resolved my issue, but just wanted to leave a note about it.
https://gist.github.com/hangtwenty/f53b3867db1e33780505ccafd8d2eef0
Error:
ImportError: cannot import name 'livereload_port' from 'livereload'
Cause:
You have both
livereload
anddjango-livereload-server
installed. Most likely, one was installed before the other,
and having both is an accident.Fix:
Assuming it's OK to just consolidate on
django-livereload-server
, get rid of your code that imports or useslivereload
directly.
Then:pip uninstall -y livereload pip install django-livereload-server
Or equivalent with your preferred package manager.
It's a simple issue really, but easy to miss.
(I initially assumeddjango-livereload-server
wrappedlivereload
, but rather it's "inspired by"
and they have a namespace collision if you install both. Easy fix though.