Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
8989 Lượt xem

Hello,

I am trying to follow the owl tutorial for beginner and have copied the content of this file https://github.com/odoo/owl/releases/download/v1.3.2/owl.cjs.js

But I am geng this error Uncaught ReferenceError: exports is not defined.

I have even installed node js on my machine but still getting the error

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello, if you are trying to use OWL in a standard JavaScript project I would recommend one of these two starter template repositories:

https://github.com/Coding-Dodo/OWL-JavaScript-Project-Starter (Rollup.js, OWL, Livereload, Jest)

https://github.com/Coding-Dodo/OWL-JavaScript-Tailwind-Project-Starter (Rollup.js, Tailwind, OWL, Livereload, Jest)


And if you want a full tutorial on creating an App with OWL you can take a look at this article series, it may interest you:

https://codingdodo.com/realworld-app-with-owl-odoo-web-library-part-1/ (Use of starter template, general knowledge, Components architecture, and Routing)

https://codingdodo.com/realworld-app-with-owl-odoo-web-library-part-2/ (OWL Store for State managements, authentication, Routing guards, APIRequests)

https://codingdodo.com/realworld-app-with-owl-odoo-web-library-part-3/ (Dynamic Routing, async components functions willUpdate and willUpdateProps).

Ảnh đại diện
Huỷ bỏ
Tác giả

Thank you for your clear and concise answer. It is really helpful

Did you update the tutorial based on owl 2?

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 6 24
4865
2
thg 5 24
2816
2
thg 5 24
4785
2
thg 5 24
1988
2
thg 4 24
2121