mail-client-extensions icon indicating copy to clipboard operation
mail-client-extensions copied to clipboard

Syntax error in main.js

Open arnaud-udf opened this issue 1 year ago • 3 comments

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: gmail_odoo Any thoughts? Thanks!

arnaud-udf avatar Feb 06 '24 23:02 arnaud-udf

I am having the same issues @arnaud-udf

Did you find a solution?

cliffkujala avatar Apr 04 '24 19:04 cliffkujala

I was able to get this to build correctly. I did make some changes to the instructions.

  1. 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.
  2. 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 with npm install --global @rollup/plugin-typescript
  3. 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.

cliffkujala avatar Apr 05 '24 00:04 cliffkujala

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
    );

cliffkujala avatar Apr 28 '24 05:04 cliffkujala