SyntaxError: Unexpected token in quill.min.js while bench start

I have installed erpnext on ubuntu 18.04. I got an error which is

Error in: /opt/bench/erpnext/apps/frappe/node_modules/quill-mention/dist/quill.mention.min.js
11:32:32 watch.1          | SyntaxError: Unexpected token (18:3487) in /opt/bench/erpnext/apps/frappe/node_modules/quill-mention/dist/quill.mention.min.js

Can anyone help me?

Similar error was fixed here…

I got the same error. Unexpected token (18:3487) in quill.mention.min.js … the above solution is not for the same. Really appreciate if somebody can look into that.

Thank you so much

Is the error causing a problem in using ERPNext or just a message in your terminal?

I got this while updating bench and running it. This is due to switching the editor from Summernote to Quill. @netchampfaris perhaps you can have a look at this later.

@kennethsequeira

Thank you so much for the reply.

Due to this error I am facing issues in dashboard. its not loading properly. can’t even finish the setup… please see the screenshot… hope you will help…

@kennethsequeira Yes, I can’t open erpnext i am facing this error

Watching...
15:15:34 watch.1          | Rebuilding frappe-web.css
15:15:34 watch.1          | Rebuilding chat.js
15:15:36 watch.1          | Rebuilding frappe-web.min.js
15:15:37 watch.1          | Rebuilding control.min.js
15:15:39 watch.1          | Error in: /opt/bench/erpnext/apps/frappe/node_modules/quill-mention/dist/quill.mention.min.js
15:15:39 watch.1          | SyntaxError: Unexpected token (18:3487) in /opt/bench/erpnext/apps/frappe/node_modules/quill-mention/dist/quill.mention.min.js
15:20:07 web.1            | 0.0.0.0 does not exist
15:20:07 web.1            | ----------------------------------------
15:20:07 web.1            | Exception happened during processing of request from ('127.0.0.1', 52678)
15:20:07 web.1            | Traceback (most recent call last):
15:20:07 web.1            |   File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread
15:20:07 web.1            |     self.finish_request(request, client_address)
15:20:07 web.1            |   File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
15:20:07 web.1            |     self.RequestHandlerClass(request, client_address, self)
15:20:07 web.1            |   File "/usr/lib/python2.7/SocketServer.py", line 652, in __init__
15:20:07 web.1            |     self.handle()
15:20:07 web.1            |   File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/werkzeug/serving.py", line 293, in handle
15:20:07 web.1            |     rv = BaseHTTPRequestHandler.handle(self)
15:20:07 web.1            |   File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
15:20:07 web.1            |     self.handle_one_request()
15:20:07 web.1            |   File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/werkzeug/serving.py", line 328, in handle_one_request
15:20:07 web.1            |     return self.run_wsgi()
15:20:07 web.1            |   File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/werkzeug/serving.py", line 270, in run_wsgi
15:20:07 web.1            |     execute(self.server.app)
15:20:07 web.1            |   File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/werkzeug/serving.py", line 260, in execute
15:20:07 web.1            |     for data in application_iter:
15:20:07 web.1            |   File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/werkzeug/debug/__init__.py", line 288, in debug_application
15:20:07 web.1            |     app_iter = self.app(environ, start_response)
15:20:07 web.1            |   File "/opt/bench/erpnext/apps/frappe/frappe/middlewares.py", line 15, in __call__
15:20:07 web.1            |     return super(StaticDataMiddleware, self).__call__(environ, start_response)
15:20:07 web.1            |   File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/werkzeug/wsgi.py", line 766, in __call__
15:20:07 web.1            |     return self.app(environ, start_response)
15:20:07 web.1            |   File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/werkzeug/wsgi.py", line 766, in __call__
15:20:07 web.1            |     return self.app(environ, start_response)
15:20:07 web.1            |   File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/werkzeug/local.py", line 228, in application
15:20:07 web.1            |     return ClosingIterator(app(environ, start_response), self.cleanup)
15:20:07 web.1            |   File "/opt/bench/erpnext/env/local/lib/python2.7/site-packages/werkzeug/wrappers.py", line 308, in application
15:20:07 web.1            |     resp = f(*args[:-2] + (request,))
15:20:07 web.1            |   File "/opt/bench/erpnext/apps/frappe/frappe/app.py", line 52, in application
15:20:07 web.1            |     init_request(request)
15:20:07 web.1            |   File "/opt/bench/erpnext/apps/frappe/frappe/app.py", line 103, in init_request
15:20:07 web.1            |     frappe.init(site=site, sites_path=_sites_path)
15:20:07 web.1            |   File "/opt/bench/erpnext/apps/frappe/frappe/__init__.py", line 138, in init
15:20:07 web.1            |     local.conf = _dict(get_site_config())
15:20:07 web.1            |   File "/opt/bench/erpnext/apps/frappe/frappe/__init__.py", line 207, in get_site_config
15:20:07 web.1            |     sys.exit(1)
15:20:07 web.1            | SystemExit: 1

I was able to setup a new site on my local bench (branch = develop).

Check the error showing up in your Javascript console on the setup wizard screen,

Now i have successfully setup new site. Thanks.

@kennethsequeira

dear, there is only two buttons shown in setup wizard. its not working actually. can you explain me a bit more how to do that … please

@munim

How did you sort that out? can you help me please…

Thank you

@M27

follow this post:

And paste the message you’re getting so others can have a look and try to help out.

@kennethsequeira dear, please check the below console message… thank you

registerEventsMessage called ial.js:2676:17

Loading failed for the with source “http://192.168.100.101/assets/js/control.min.js?ver=1540107557.0”. desk:2671
Unable to handle success response request.js:219:4
console.trace() request.js:220:4
Rollup</frappe.request.call/< request.js:220:4
i http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:2:27146
fireWith http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:2:27914
z http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:4:12057
c/< http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:4:15619

[Show/hide message details.] TypeError: frappe.ui.form.make_control is not a function[Learn More] layout.js:147:19
init_field layout.js:147:19
make_field layout.js:135:19
render/< layout.js:90:5
each http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:2:2859
render layout.js:78:2
make layout.js:24:2
make field_group.js:22:3
Rollup</</a.extend/n[i]</<class.js:53:14
Rollup</frappe.ui.Slide</e.prototype.setup_form slides.js:63:2
Rollup</frappe.ui.Slide</e.prototype.refresh slides.js:51:3
Rollup</frappe.ui.Slide</e.prototype.make slides.js:44:2
make http://192.168.100.101/desk:325:3
Rollup</frappe.ui.Slides</e.prototype.show_slide slides.js:362:3
show_slide http://192.168.100.101/desk:139:3
frappe.pages[“setup-wizard”].on_page_show http://192.168.100.101/desk:73:20
trigger_page_event pageview.js:94:11
init/< pageview.js:89:3
dispatch http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:3:7485
add/r.handle http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:3:5603
trigger http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:4:4816
trigger/< http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:4:5320
each http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:2:2859
each http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:2:843
trigger http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:4:5299
change_to container.js:82:2
show/</< pageview.js:51:4
with_page pageview.js:19:3
show/< pageview.js:44:3
with_doctype model.js:97:15
show pageview.js:43:2
Rollup</frappe.route router.js:51:2
Rollup</< router.js:178:1
dispatch http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:3:7485
add/r.handle http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:3:5603

[Show/hide message details.] TypeError: e.current_slide is undefined[Learn More] slides.js:333:9
Rollup</frappe.ui.Slides</e.prototype.make_prev_next_buttons/this.$next_btn<
slides.js:333:9
dispatch http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:3:7485
add/r.handle http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:3:5603

[Show/hide message details.] TypeError: frappe.ui.form.make_control is not a function[Learn More]
init_field layout.js:147:19
make_field layout.js:135:19
render/< layout.js:90:5
each http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:2:2859
render layout.js:78:2
make layout.js:24:2
make field_group.js:22:3
Rollup</</a.extend/n[i]</< class.js:53:14
Rollup</frappe.ui.Slide</e.prototype.setup_form slides.js:63:2
Rollup</frappe.ui.Slide</e.prototype.refresh slides.js:51:3
Rollup</frappe.ui.Slide</e.prototype.make slides.js:44:2
make http://192.168.100.101/desk:325:3
Rollup</frappe.ui.Slides</e.prototype.show_slide slides.js:362:3
show_slide http://192.168.100.101/desk:139:3
Rollup</frappe.ui.Slides</e.prototype.make_prev_next_buttons/this.$prev_btn< slides.js:329:24
dispatch http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:3:7485
add/r.handle http://192.168.100.101/assets/frappe/js/lib/jquery/jquery.min.js:3:5603

I got the same issue. Error in: /home/frappe/frappe-bench/apps/frappe/node_modules/quill-mention/dist/quill.mention.min.js

Hi Munim, can you please share what change you made to fix this? Thanks

$ bench update --reset
(…)
Building frappe assets…
(…)
:heavy_check_mark: Built css/desk.min.css
:heavy_check_mark: Built js/frappe-web.min.js
SyntaxError: Unexpected token (18:3487) in /home/frappe/frappe-bench/apps/frappe/node_modules/quill-mention/dist/quill.mention.min.js
:heavy_check_mark: Built js/control.min.js
:heavy_check_mark: Built js/report.min.js
:sparkles: Done in 30.631s

Seems like someone broke something quite recently.

The way i get rid of it. Can not go to desk after run bench update - #8 by TaiLouis

Run command bench update --reset

then bench build

After that bench migrate

At last create new site bench new-site sitename

Though after bench update you don’t need bench build command, but i have done because while update i face this error and build process intercept.

Did it work for you?

Fixed in staging-fixes branch

https://github.com/frappe/frappe/pull/6295

2 Likes

I still have that error but successfully run erpnext.

Error is officially gone, so this seems to be solved IMO.

1 Like