Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax error in main.js #40

Open
arnaud-udf opened this issue Feb 6, 2024 · 3 comments
Open

Syntax error in main.js #40

arnaud-udf opened this issue Feb 6, 2024 · 3 comments

Comments

@arnaud-udf
Copy link

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!

@cliffkujala
Copy link

I am having the same issues @arnaud-udf

Did you find a solution?

@cliffkujala
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants