Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

buildModularBlock is not a function #145

Open
tholder opened this issue Apr 22, 2022 · 1 comment
Open

buildModularBlock is not a function #145

tholder opened this issue Apr 22, 2022 · 1 comment

Comments

@tholder
Copy link

tholder commented Apr 22, 2022

Having trouble calling buildModularBlock.

import { SiteClient, buildModularBlock } from 'datocms-client'

console.log(buildModularBlock)

Returns undefined. Can't call this function. I've looked through the code here and can't quite determine what's going on. The following hints at a similar issue https://community.datocms.com/t/can-you-programmatically-create-blocks-in-plugins/2407

@tholder
Copy link
Author

tholder commented Apr 22, 2022

If I import direct it seems to work:

import buildModularBlock from 'datocms-client/lib/utils/buildModularBlock'

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

No branches or pull requests

1 participant