Cannot find module 'wix-bookings'

I moved wix bookings related code to JSW web module. I am getting

Error loading web module backend/api.jsw: Cannot find module 'wix-bookings’api.jsw


import {fetch} from ‘wix-fetch’;
import wixBookings from ‘wix-bookings’;

Can I import wixBookings inside web module?

Why do that in the first place when Wix Bookings is a Wix API itself?!

If Wix Bookings worked in backend it would be called Wix Bookings backend like all the other Wix API that have backend capabilities.

Also, if your backend jsw file is simply called api, then you need to reflect that in your actual code too.

Sorry, this does not answer my question. Can I or cannot import wix-booking in JSW web modules?

1 Like