search
LoginSignup
0
Help us understand the problem. What are the problem?

More than 3 years have passed since last update.

posted at

updated at

djangoエラー django.db.migrations.exceptions.NodeNotFoundError: Migration app.0001_initial dependencies reference nonexistent parent node ('auth', '0011_update_proxy_permissions')

djangoで以下のようなエラーが出た場合は、存在していない親ノード(今回の場合はauth)を参照している可能性があります。

django.db.migrations.exceptions.NodeNotFoundError: Migration app.0001_initial dependencies reference nonexistent parent node ('auth', '0011_update_proxy_permissions')

そんな時は、djangoのバージョンを2.2以上にグレードをあげるとなおる可能性があります。今回の場合は2.2.4

1 djangoバージョンを2.2.4へあげて

pip3 install django==2.2.4 --user

2 manage.pyがある場所でrunserverを実施します。

python manage.py runserver

無事runserverやmigrateが通りました。

C:\Users\hoge\Desktop\hoge\hoge>python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
August 27, 2019 - 08:15:33
Django version 2.2.4, using settings 'hoge.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.

3補足 

参考までにエラー一覧を掲載しておきます。

Performing system checks...

System check identified no issues (0 silenced). Unhandled exception in thread started by .wrapper at 0x0000029C0D0D3EA0> Traceback (most recent call last): File "C:\Users\hogeuser\AppData\Roaming\Python\Python36\site-packages\django\utils\autoreload.py", line 225, in wrapper fn(*args, **kwargs) File "C:\Users\hogeuser\AppData\Roaming\Python\Python36\site-packages\django\core\management\commands\runserver.py", line 120, in inner_run self.check_migrations() File "C:\Users\hogeuser\AppData\Roaming\Python\Python36\site-packages\django\core\management\base.py", line 442, in check_migrations executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS]) File "C:\Users\hogeuser\AppData\Roaming\Python\Python36\site-packages\django\db\migrations\executor.py", line 18, in init self.loader = MigrationLoader(self.connection) File "C:\Users\hogeuser\AppData\Roaming\Python\Python36\site-packages\django\db\migrations\loader.py", line 49, in init self.build_graph() File "C:\Users\hogeuser\AppData\Roaming\Python\Python36\site-packages\django\db\migrations\loader.py", line 273, in build_graph raise exc File "C:\Users\hogeuser\AppData\Roaming\Python\Python36\site-packages\django\db\migrations\loader.py", line 247, in build_graph self.graph.validate_consistency() File "C:\Users\hogeuser\AppData\Roaming\Python\Python36\site-packages\django\db\migrations\graph.py", line 243, in validate_consistency [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)] File "C:\Users\hogeuser\AppData\Roaming\Python\Python36\site-packages\django\db\migrations\graph.py", line 243, in [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)] File "C:\Users\hogeuser\AppData\Roaming\Python\Python36\site-packages\django\db\migrations\graph.py", line 96, in raise_error raise NodeNotFoundError(self.error_message, self.key, origin=self.origin) django.db.migrations.exceptions.NodeNotFoundError: Migration app.0001_initial dependencies reference nonexistent parent node ('auth', '0011_update_proxy_permissions')

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
0
Help us understand the problem. What are the problem?