Problems using Custom Integration

Hello!
I am writing custom integration using boilerplate npx @vue-storefront/cli create integration

everything configured as per documentation, added endpoints - and it works fine with playground 🙂

And now I want to use it to connect to some demo application based on https://github.com/vuestorefront/storefront-next13-boilerplate/tree/develop

And i need help here, it seems I am missing something, which doesn't let me start the middleware.

Here is what I did so far.

I built the middleware sdk: inside integration application -> packages/sdk -> run yarn build
as a result I got the lib folder, which I copy into my Next.js application

In the Next.js application I updated middleware.config.js with configuration
and location: '@vue-storefront/integration-boilerplate-api/server' -> which looks weird to me, but that is another question.

when trying to run middleware application getting error:

ℹ Middleware starting....                                                                  
ℹ Loading integrations...                                                                    
ℹ - Loading: nochannelApi @vue-storefront/integration-boilerplate-api/server                 

 ERROR  Cannot find module '@vue-storefront/integration-boilerplate-api/server'              
Require stack:
- /vsf-ui/integration/node_modules/@vue-storefront/middleware/lib/index.cjs.js
- /vsf-ui/integration/middleware.js

  Require stack:
  - node_modules/@vue-storefront/middleware/lib/index.cjs.js
  - middleware.js



Could you please help me to understand what exactly am I doing wrong ? 🥹 🙏
GitHub
Vue Storefront Next 13 Boilerplate. Contribute to vuestorefront/storefront-next13-boilerplate development by creating an account on GitHub.
Was this page helpful?