mail-client-extensions
mail-client-extensions copied to clipboard
Syntax error in main.js
Hello
After following all the steps detailed in the readme, I can't manage to deploy the build, neither manually nor via clasp.
It seems like there's a syntax error on line 2204 and 2220 in the main.js after compilation:
Any thoughts?
Thanks!
I am having the same issues @arnaud-udf
Did you find a solution?
I was able to get this to build correctly. I did make some changes to the instructions.
- Instead of deleting the 3 lines that limit websites to only subdomains of odoo.com on the /src/views/login.ts file, I modified those lines to match my companies domain name.
- I also believe I had a problem with how rollup was handling @rollup/plugin-typescript. I previously installed that with
npm install --save-dev @rollup/plugin-typescript
but this time I installed it withnpm install --global @rollup/plugin-typescript
- Before I performed
npx rollup -c
I also created a Script Property on my Apps Script Project for ODOO_SHARED_SECRET as mentioned on the iap_instructions.md file. Not sure if that had anything to do with it though to be honest.
In any case, the build files uploaded via clasp now without any syntax errors.
I'm not sure why, but following my instructions which worked above failed when I tried them again. I do see the difference in a working main.js vs the one which has the errors @arnaud-udf posted on lines 2204 and 2220. The built file has a , at the end of lines 2203 and 2219 which should not be there. Make those sections like this and try again.
const [partner, odooUserCompanies, canCreatePartner, canCreateProject, error] = Partner.enrichPartner(
currentEmail.contactEmail,
currentEmail.contactName
);
const state = new State(
partner,
canCreatePartner,
currentEmail,
odooUserCompanies,
null,
null,
canCreateProject,
error
);