Try ERPNext Buy Support Partners Foundation

[Release] ERPNext Version 12

INFO:bench.utils:yarn install
yarn install v1.17.3
[1/4] Resolving packages…
[2/4] Fetching packages…
error cypress-file-upload@3.1.0: The engine “node” is incompatible with this module. Expected version “>=8.2.1”. Got “6.17.1”
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/update.py”, line 61, in update
_update(pull, patch, build, bench, auto, restart_supervisor, restart_systemd, requirements, no_backup, force=force, reset=reset)
File “/home/frappe/.bench/bench/commands/update.py”, line 85, in _update
update_node_packages(bench_path=bench_path)
File “/home/frappe/.bench/bench/utils.py”, line 452, in update_node_packages
update_yarn_packages(bench_path)
File “/home/frappe/.bench/bench/utils.py”, line 465, in update_yarn_packages
exec_cmd(‘yarn install’, cwd=app_path)
File “/home/frappe/.bench/bench/utils.py”, line 159, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: yarn install

Have you tried this?

Updating Nodejs
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

5 Likes

Thanks @xickomesquita! Seems like that did the trick. It’s building the assets now so hopefully it’ll build with no issues. Looking forward to trying v12!

1 Like

Anyone noticed this?

digging further, i found that the attempt to fix the branch issue failed 2 hours ago in github. I assume this is why a lot of attempts to upgrade directly have been failing.

Let us know if it works!

ran into a similar issue as @DrTrills and this helped

1 Like

Was the ability to install earlier versions (v10 especially) killed following this release? I just attempted to install v10 and even though the installation ran successfully i got presented with v12. Worse still, i cannot restore v10 backup on v12 as a long trace back error is thrown when i run bench migrate after backup is restored, effectively killing my instance.

Just do what @DrTrills suggested, run this command on your erpnext directory, i.e /frappe-bench/apps/erpnext

git config remote.upstream.fetch "+refs/heads/*:refs/remotes/upstream/*"

and then

bench switch-to-branch version-12 --upgrade
bench update --patch

1 Like

I followed the instructions above and got this after completing the process:

This appeared on my home page

UPDATE: I rebooted the machine and i’m able to login. But only frappe seems to have migrated. How to i migrate erpnext? This is what i see.

Please report and discuss issues here [Mega Thread] Version 12 Release Bugs

This is what i have been trying to fix. So far i keep getting this error:

frappe.exceptions.DoesNotExistError: DocType Item Manufacturer not found

Full trace back

Updating DocTypes for frappe        : [========================================]
Updating DocTypes for erpnext       : [========================================]
Updating customizations for Address
Generating Website Theme Files...
Migrating erp.oceanbaycommunity.com
Executing erpnext.patches.v12_0.move_item_tax_to_item_tax_template in erp.oceanbaycommunity.com (7ac0bf1eac7575cd)
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
    main()
  File "/home/octo5/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 25, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/commands/site.py", line 233, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/migrate.py", line 48, in migrate
    frappe.modules.patch_handler.run_all()
  File "/home/octo5/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 29, in run_all
    if not run_single(patchmodule = patch):
  File "/home/octo5/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 63, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 83, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/octo5/frappe-bench/apps/erpnext/erpnext/patches/v12_0/move_item_tax_to_item_tax_template.py", line 44, in execute
    item.save()
  File "/home/octo5/frappe-bench/apps/frappe/frappe/model/document.py", line 271, in save
    return self._save(*args, **kwargs)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/model/document.py", line 305, in _save
    self.validate_higher_perm_levels()
  File "/home/octo5/frappe-bench/apps/frappe/frappe/model/document.py", line 572, in validate_higher_perm_levels
    high_permlevel_fields = frappe.get_meta(df.options).meta.get_high_permlevel_fields()
  File "/home/octo5/frappe-bench/apps/frappe/frappe/__init__.py", line 759, in get_meta
    return frappe.model.meta.get_meta(doctype, cached=cached)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/model/meta.py", line 37, in get_meta
    meta = Meta(doctype)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/model/meta.py", line 84, in __init__
    super(Meta, self).__init__("DocType", doctype)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/model/document.py", line 104, in __init__
    self.load_from_db()
  File "/home/octo5/frappe-bench/apps/frappe/frappe/model/meta.py", line 89, in load_from_db
    super(Meta, self).load_from_db()
  File "/home/octo5/frappe-bench/apps/frappe/frappe/model/document.py", line 147, in load_from_db
    frappe.throw(_("{0} {1} not found").format(_(self.doctype), self.name), frappe.DoesNotExistError)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/__init__.py", line 360, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red')
  File "/home/octo5/frappe-bench/apps/frappe/frappe/__init__.py", line 346, in msgprint
    _raise_exception()
  File "/home/octo5/frappe-bench/apps/frappe/frappe/__init__.py", line 315, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.DoesNotExistError: DocType Item Manufacturer not found

This is the correct command for it to work:

git config remote.upstream.fetch “+refs/heads/:refs/remotes/upstream/” from the erpnext folder.

And then:

bench switch-to-branch version-12 --upgrade
bench update --patch

Thanks

Jay

1 Like

I tried your method but just in erpnext dir and it failed when building frappe assets. I then repeated it but this time i ran git config remote.upstream.fetch “+refs/heads/ :refs/remotes/upstream/ ” also on the frappe dir and everything worked fine but i got we will be back soon when trying to log in.

I have checked supervisor status using supervisorctl status and everything is running. I also restarted but no luck.

UPDATE:

I just checked my web.error.log file and found this error:

Traceback (most recent call last):
  File "/home/octo5/frappe-bench/env/bin/gunicorn", line 10, in <module>
    sys.exit(run())
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 61, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/gunicorn/app/base.py", line 223, in run
    super(Application, self).run()
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/gunicorn/app/base.py", line 72, in run
    Arbiter(self).run()
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/gunicorn/arbiter.py", line 60, in __init__
    self.setup(app)
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/gunicorn/arbiter.py", line 120, in setup
    self.app.wsgi()
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
    return self.load_wsgiapp()
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgia$
    return util.import_app(self.app_uri)
  File "/home/octo5/frappe-bench/env/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/home/octo5/frappe-bench/apps/frappe/frappe/app.py", line 27, in <module>
    import frappe.recorder
  File "/home/octo5/frappe-bench/apps/frappe/frappe/recorder.py", line 14, in <module>
    import sqlparse
ModuleNotFoundError: No module named 'sqlparse'

Any idea if this could be the cause?

Actually, I didn’t miss the *s in the command. The forum doesn’t show the *s. So replacing the * with (star) for your comprehension. Here’s the command:

git config remote.upstream.fetch “+refs/heads/(star):refs/remotes/upstream/(star)” from erpnext and then

bench switch-to-branch version-12 --upgrade
bench update --patch

Hope that helps.

Thanks

Jay

okay. but to reconfirm, am i to run it in only the erpnext directory?

UPDATE: Upgrade completed successfully but only frappe upgraded to v12. erpnext is still on v11

can anyone point out what would be the latest moment when to run the …

switch-to-branch [version]

… command when your instance is on the master branch currently?

not 100% sure if that is still relevant but from switching branches from staging to master las time , but as far as I remember …

switch-to-branch [branch] --upgrade

… would be the ideal command of choice.

Okay, sorry if I am getting too detailed. :slight_smile:

git config remote.upstream.fetch “+refs/heads/(star):refs/remotes/upstream/(star)” from erpnext and then

from frappe-bench directory

bench switch-to-branch version-12 --upgrade
bench update --patch

Hope that helps.

Thanks

Jay

2 Likes

I figured i’d need to do that so i already did. But when i try to migrate i get this error:

frappe.exceptions.DoesNotExistError: DocType Item Manufacturer not found

I essentially gave up, setup a new v12 instance and restored backup and everything is fine. i have tried direct upgrade all day and it doesn’t work