i2group / notebook-sdk

Create plug-ins that expand and enhance the functionality of the i2 Notebook web client by using the i2 Notebook SDK. The SDK is comprised of documentation, tools, and sample code.
https://i2group.github.io/notebook-sdk/
MIT License
4 stars 1 forks source link

http://localhost:5173/: Unexpected token 'T', "The server"... is not valid JSON #14

Closed stvdo closed 7 months ago

stvdo commented 7 months ago

Good morning,

I try to follow the manual to create a React plugin with the View API, https://i2group.github.io/notebook-sdk/guide/tutorials/react-plugin.html.

When I add the base in the vite.config.ts the proxy gives an error when I refresh i2 Notebook in the browser. When I use './' it doesn't give an error, except that the viewTool is empty.

Maybe it's because I am running i2 Analyze in Docker containers, so it's not clear where I have to add the /plugins/myplugin/ folder.

Printscreen of the vite.config.ts and the error 'Unexpected token 'T'. image

Printscreen of the local running plugin image

stvdo commented 7 months ago

I got it working.

In docker I had to create a new folder in the i2a-plugins folder. And I used /opal/plugins/{{FOLDER_NAME}}/