silexlabs / grapesjs-symbols

Symbols plugin for GrapesJS: reuse elements in a website accross pages
GNU Affero General Public License v3.0
16 stars 7 forks source link

Could not find a declaration file for module #5

Closed Samkanda closed 1 year ago

Samkanda commented 1 year ago

Hey, I saw the package and loved it. I am currently using grapesjs in React(nextjs) but when trying to import the npm package that I installed <import symbols from "@silexlabs/grapesjs-symbols"> It states Could not find a declaration file for module '@silexlabs/grapesjs-symbols'. Any ideas for a solution?

image

lexoyo commented 1 year ago

Hello

This package has no declaration file, it is just js not typescript

Maybe check the "Plan C: Create a declaration file" of this article

Or follow these instructions from this article

If you got the error when trying to import JavaScript files in your project, you have to set allowJs to true in your tsconfig.json file. (In that case, scroll down to the tsconfig.json section)

Please let me know how it goes

Samkanda commented 1 year ago

Haha, just implemented the scripts in the parent component of my react component and it worked. Didn't realize that would work lol. Now just trying to figure out how to save the symbol components alongside the page data.

lexoyo commented 1 year ago

Haha, just implemented the scripts in the parent component of my react component and it worked. Didn't realize that would work lol. Now just trying to figure out how to save the symbol components alongside the page data.

It is supposed to send the data along with the site data automatically, in symbols key

lexoyo commented 1 year ago

Hi @Samkanda Did you manage to use this plugin? I'll spend some time next week improving it, would you have some feedback?