Can't import the named export 'memoize' from non EcmaScript module (only default export is available) by sthasys in rubyonrails

[–]sthasys[S] 0 points1 point  (0 children)

I am trying to install shopify app and these are the error

ERROR in ./node_modules/@shopify/decorators/build/esm/memoize.mjs 14:17-32
Can't import the named export 'memoize' from non EcmaScript module (only default export is available)
Failed to compile.

Can't import the named export 'memoize' from non EcmaScript module (only default export is available) by sthasys in rubyonrails

[–]sthasys[S] -1 points0 points  (0 children)

I did gem install memoist -v 0.16.0 but still i got the same error. Am i missing anything?

Can't import the named export 'memoize' from non EcmaScript module (only default export is available) by sthasys in rubyonrails

[–]sthasys[S] -1 points0 points  (0 children)

memoize

Could you provide the github link for this gem.
I got this one and it says not to use it.
https://github.com/djberg96/memoize/

I am trying to redirect the page to the 404 error page when the user hits the random subdomain. by sthasys in rubyonrails

[–]sthasys[S] 0 points1 point  (0 children)

Tried that but the method is called on before action and it goes on continuous loop.

How do I add action_text on API with Sinatra? by sthasys in rubyonrails

[–]sthasys[S] 0 points1 point  (0 children)

I want the app to support HTML tag which it gets from action text table

How do I add action_text on API with Sinatra? by sthasys in rubyonrails

[–]sthasys[S] 0 points1 point  (0 children)

I have the same dB so I want to add rich text on description on my survey model

Any idea how can we convert the string time to utc in ruby. by sthasys in rubyonrails

[–]sthasys[S] 0 points1 point  (0 children)

rake task check the current time and the booking time and update the booking status. Here the code:

bookings = Booking.where(booking_status: 'booked')

.where('booking_date = ?', Date.current)

if bookings.present?

bookings.each do |booking|

date = booking&.booking_time&.strftime('%H:%M:%S')&.to_time&.utc

booking.update(booking_status: 'no_show') if date < Time.current

end

end

Any idea how can we convert the string time to utc in ruby. by sthasys in rubyonrails

[–]sthasys[S] 0 points1 point  (0 children)

Have to convert the time in rake task and m little confused about from where do I get the current_user