8000 problem building an app in production that was working in dev · Issue #1657 · odoo/owl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
problem building an app in production that was working in dev #1657
Open
@dberardo-com

Description

@dberardo-com

hi there i am playing around the o-spreadsheet project and everything works fine in dev mode. But when i build the app (tried both with webpack and vite) i get this strange error:

No active component (a hook function should only be called in 'setup')

i am trying to mount the owl component using the "rootApp" strategy shown in the main.js file of the demo folder. here the relevant code:

 const rootApp = new owl.App(Spreadsheet, { props: { model } });
 rootApp.addTemplates(templates);
 rootApp.mount(document.body, {});

i have tried to move the 2 hooks "useRef("spreadsheet");" and "useSpreadsheetRect();" in Spreadsheet component inside the setup() function but still get this error.

this same code use to work in v16 ...


Notice that everything works fine in development mode, but does not in the build version ... any hint this might be ?

NOTE: the app was working fine in both environments in version 16 of the spreasheet (owl 2.1) now i get the problem in v18 (owl 2.3)

i have reported the issue here but i believe it could be related to owl as well: odoo/o-spreadsheet#5293

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0