A
Alokai•6mo ago
Sestius

Custom integration - turbo cannot find binary path

Hello, I ran into a bit of an issue with both just running "npx @vue-storefront/cli create integration" (found here: https://docs.alokai.com/integrations/custom/quick-start), as well as using the boilerplate from "https://github.com/vuestorefront/integration-boilerplate" directly (cloning it and trying to run it) Using the npx command prompts me to choose a name, the framework and the package manager. It just continous on with its tasks until building the boilerplate where it runs into the following error: Error: Command failed with exit code 1: npm run build > build > turbo run build x could not resolve workspaces: We detected multiple package managers in | your repository: npm, yarn. Please remove one of them. -> We detected multiple package managers in your repository: npm, yarn. Please remove one of them. I would just like to use the npx command because to be honest, I am lazy and just try to look into moving a project we have at the company from an old vue-storefront version to this one. But I can just not figure out why even when I select NPM during the prompts it keeps on bringing this up. Anyway, if I afterwards cd into the folder it created for me, make sure to remove yarn, change all the still to yarn referencing scripts to npm, and run "npm run build", it presents me with the next error:
build turbo run build
x could not resolve workspaces: cannot find binary path -> cannot find binary path Beeing stuborn and deciding to ignore all that and still running "npm run dev", it spins up a server on my machine. BUT it appears to not be working, because the example method on that page it gives me under a localhost address just does not what you would expect to happen. Also I am presented with some errors in my powershell window as you can see in the attachement, since Discord did not allow me to post that inside code fences.
10 Replies
Sestius
SestiusOP•6mo ago
TBH I am stuck here..... Am I missing something from the docs? But they are quite sparse for the custom integration part. Sorry for the long post...I was just at my wits end.
Mateusz Ostafil
Mateusz Ostafil•6mo ago
Can you show how you register your custom integration in the middleware? I also see that you run the ApiClient along the middleware+storefront. That might explain your issues with running it. The integration boilerplate is designed to be a separate repository from which you build a package that later you register in the middleware. Sometimes this might be too much of an overhead so you can include the integration in your monorepo but you shouldn't run the integration itself along the middleware and the storefront.
Sestius
SestiusOP•6mo ago
"Can you show how you register your custom integration in the middleware? " I guess I can do that, but I did not change anything in there.
export const integrations = {
boilerplate: {
location: "@vue-storefront/integration-boilerplate-api/server",
configuration: {},
},
};
export const integrations = {
boilerplate: {
location: "@vue-storefront/integration-boilerplate-api/server",
configuration: {},
},
};
From what I gathered I should be able to just run the clean boilerplate, before I change anything?
Mateusz Ostafil
Mateusz Ostafil•6mo ago
there's no such package as @vue-storefront/integration-boilerplate-api/server instead youy should provide path to the integration that you have created
Sestius
SestiusOP•6mo ago
Should it not resolve to the index.server.ts?
No description
Sestius
SestiusOP•6mo ago
My mistake, it should not. There is none as you stated.
Sestius
SestiusOP•6mo ago
I was missing out on running the build command with the api-client package it seems. Doing that gave me the proper dir it was looking for. Maybe that was in fact all I was missing.
No description
Sestius
SestiusOP•6mo ago
It seems like it really was. The example is working properly and I should be able to start experimenting with it now. Thanks for your time and patience
Mateusz Ostafil
Mateusz Ostafil•5mo ago
no problem, good luck 😉
Sestius
SestiusOP•5mo ago
Want results from more Discord servers?
Add your server