محمد نوایی
محمد نوایی

Reputation: 23

Raised NodeNotFoundError

When I deploy the project on herokou server, while migrating, I encountered this error. While in my system, there was no such error and the project was working properly

Traceback (most recent call last):
  File "manage.py", line 21, in <module>
    main()
  File "manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/app/.heroku/python/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, i
n execute_from_command_line
    utility.execute()
  File "/app/.heroku/python/lib/python3.7/site-packages/django/core/management/__init__.py", line 395, i
n execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/app/.heroku/python/lib/python3.7/site-packages/django/core/management/base.py", line 328, in ru
n_from_argv
    self.execute(*args, **cmd_options)
  File "/app/.heroku/python/lib/python3.7/site-packages/django/core/management/base.py", line 369, in ex
ecute
    output = self.handle(*args, **options)
  File "/app/.heroku/python/lib/python3.7/site-packages/django/core/management/base.py", line 83, in wra
pped
    res = handle_func(*args, **kwargs)
  File "/app/.heroku/python/lib/python3.7/site-packages/django/core/management/commands/migrate.py", lin
e 86, in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
  File "/app/.heroku/python/lib/python3.7/site-packages/django/db/migrations/executor.py", line 18, in _
_init__
    self.loader = MigrationLoader(self.connection)
  File "/app/.heroku/python/lib/python3.7/site-packages/django/db/migrations/loader.py", line 49, in __i
nit__
    self.build_graph()
  File "/app/.heroku/python/lib/python3.7/site-packages/django/db/migrations/loader.py", line 274, in bu
ild_graph
    raise exc
  File "/app/.heroku/python/lib/python3.7/site-packages/django/db/migrations/loader.py", line 248, in bu
ild_graph
    self.graph.validate_consistency()
  File "/app/.heroku/python/lib/python3.7/site-packages/django/db/migrations/graph.py", line 195, in val
idate_consistency
    [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
  File "/app/.heroku/python/lib/python3.7/site-packages/django/db/migrations/graph.py", line 195, in <li
stcomp>
    [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
  File "/app/.heroku/python/lib/python3.7/site-packages/django/db/migrations/graph.py", line 58, in rais
e_error
    raise NodeNotFoundError(self.error_message, self.key, origin=self.origin)
django.db.migrations.exceptions.NodeNotFoundError: Migration account.0001_initial dependencies reference
 nonexistent parent node ('auth', '0013_auto_20200828_2241')

Where is the problem?

Upvotes: 1

Views: 1386

Answers (1)

Life By Ben
Life By Ben

Reputation: 186

It says what the error is. You have an app called "account" and the migrations for this app is looking for migration 0013_auto_20200828_2241 in 'auth" which is one of django's main migrations.

This probably means in your requirements you are using a different version of django to your local. So your local has the migration and the one you are installing on heroku does not?

Upvotes: 1

Related Questions