vivmagarwal / strapi-plugin-custom-api-builder

36 stars 9 forks source link

Error Activating Custom-API #1

Closed luzadev closed 2 years ago

luzadev commented 2 years ago

Hi, after setting all information on file plugin.js when launch this command: yarn build, I get this error: Error: ./src/plugins/custom-api couldn't be resolved

roganoalien commented 2 years ago

Has this issue been solved? I've just tried the plugin and have the same issue

roganoalien commented 2 years ago

Hi, after setting all information on file plugin.js when launch this command: yarn build, I get this error: Error: ./src/plugins/custom-api couldn't be resolved

Found the solution. Install the plugin and add the configuration in ./config/plugins.js then create the following folders ./src/plugins/custom-api and clone the repo inside of custom-api folder. Build the UI and then run the server and it will be working

luzadev commented 2 years ago

Thanks...Now its ok!

incutonez commented 2 years ago

I'm not entirely sure what the point of resolve is (maybe if you want to reference different versions of it, but it feels like it should default to node_modules like the other plugins behave), but it seems like if you install it with npm, you should set your resolve to be the node_modules location... e.g. resolve: './node_modules/strapi-plugin-custom-api'.