ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Bench build doesn't run for custom app


#1

Hi,
I downloaded Virtual disk, installed it and use for myself.
For my customization, I created new app mycustomapp.
I want to add new js library
I added hooks.py

app_include_js = ["/assets/mycustomapp/js/mycustomapp.min.js"]

in the folder public I created build.json

{
 	"js/mycustomapp.min.js": [
 		"public/js/test.js",
 	],
 }

then I run bench restart and bench migrate and bench clear-cache and finally bench build
but bench build doesn’t see mycustomapp assets.
in my site_config.json I set "developer_mode": 1
Please help me,
Thank you


#2

I still need a help, please


#3

check if you have installed the app on your site or not because build.json and hooks.py seems to be correct.


#4

Thank you for your answer, yes it’s installed
bench list-apps return

frappe
erpnext
mycustomapp

#5

try change it

app_include_js = ["/assets/js/mycustomapp.min.js"]


#6

hi, thank you, unfortunately it doesn’t help(


#7

Did you start again bench?

bench build
bench start


#8

thank you, yes, I’m going to try to run bench reinstall and then update you
@vinhnguyent090 It helped, thank you)


#9

@NMyshuk Natalia, I can’t seem to get it to work on 1 of 2 benches. Did you end up figuring this out?

Edit: it was a syntax error in my build.json


#10

hi, this syntax errors are most insidious :slight_smile:


#11

This is actually the second time it’s happened to me. When there’s a syntax error in build.json, the build function doesn’t raise an errors, it just skips it. It’s not that it isn’t my fault, it’s that I wasn’t told it was my fault.


#12

so, maybe you should raise the issue on the github? or if you know how to improve/change build functionality make pull request? (it’s just comment/proposal, just for giving you the answer because the dialog is needed sometimes)