A
Alokaiβ€’12mo ago
its.chris.b

Custom integration example/docs

There was mention that updated example & docs for custom integrations were coming late May... What's the status of this? We are about to kickoff development and can't drag our feet in discovery anymore. I need to have confidence that we are building in a future-proof fashion, as this is a significant $ project.
20 Replies
rohrig
rohrigβ€’12mo ago
Hi @Chris B πŸ‘‹ , we're offically realeasing this next week. But you can already check it out now. https://github.com/vuestorefront/integration-boilerplate
GitHub
GitHub - vuestorefront/integration-boilerplate: Framework Independe...
Framework Independent boilerplate containing SDK and API Client starters. - GitHub - vuestorefront/integration-boilerplate: Framework Independent boilerplate containing SDK and API Client starters.
rohrig
rohrigβ€’12mo ago
Any early feedback would be great πŸ˜„
Nicole
Nicoleβ€’12mo ago
@rohrig I just attempted to use this CLI with node v16.16, but it results in: Error: command create:integration not found However, when I run the CLI with node v14.21, the CLI is able to find and initiate the project. (This runs into errors down the line) I notice the requirements say node v16 is required. Let me know if this is expected behavior.
skirianov
skirianovβ€’12mo ago
@Nicole did you run create:integration or create integration? πŸ€”
Nicole
Nicoleβ€’12mo ago
@skirianov I ran "create integration". When I run in node v14 and npx 6.14 it works. See attached screenshots? EDITED TO ADD: I ended up running npm install @vue-storefront/cli first. Then, I ran CLI the command to create integrations and it worked. Now it will correctly throw an error if I attempt to use v14 stating that the required node version must be v16+. I think maybe the old npx version bypasses that requirements check.
skirianov
skirianovβ€’12mo ago
@Nicole we have pushed latest once again, can you please try it out? It should work well with Node 16 πŸ€”
Nicole
Nicoleβ€’12mo ago
@skirianov Beautiful! It is now working well with Node 16. Integrations using npm are able to install and build correctly. However, when I create the integrations with yarn I get the following error. This happens for both Next and Nuxt: Error: Command failed with exit code 1: yarn run build /home/sewandsell/apps/sewandsell_frontend/vue_cli_integrations/spree/.pnp. cjs:27196 Error.captureStackTrace(firstError); ^ Error: @lerna/legacy-package-management tried to access @lerna/child-process, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound. Required package: @lerna/child-process Required by: @lerna/legacy-package-management@npm:6.6.2 (via /home/sewandsell/apps/sewandsell_frontend/vue_cli_integrations/spree/.yarn /cache/@lerna-legacy-package-management-npm-6.6.2-7512f94c6c-e5f8cf3a68.zi p/node_modules/@lerna/legacy-package-management/dist/) .... more
Nicole
Nicoleβ€’12mo ago
Looks like lerna v7 was recently released 2 days ago and might resolve this issue: https://github.com/lerna/lerna/issues/3622
GitHub
Lerna 6.6.0 and up fails with yarn pnp Β· Issue #3622 Β· lerna/lerna
Current Behavior Updating lerna from 6.5.1 to 6.6.1 causes lerna commands to fail in a system that uses yarn pnp. Expected Behavior Lerna commands work as expected. Steps to Reproduce Take the repr...
skirianov
skirianovβ€’12mo ago
@Nicole what's the OS you're running?
FabianClemenz
FabianClemenzβ€’12mo ago
same here - needed to manually npm install @vue-storefront/cli before the npx command was able to run Same for adding the endpoint. Needed to install the cli in the project dir
skirianov
skirianovβ€’12mo ago
Fabian what’s your OS?
FabianClemenz
FabianClemenzβ€’12mo ago
MacOS πŸ™‚ and node 16.14.2
skirianov
skirianovβ€’12mo ago
that's weird. Can you please run rm -rf ~/.npm/_npx - this will clear npx cache and run the integration command again
FabianClemenz
FabianClemenzβ€’12mo ago
oh ok its working - installing the cli thanks πŸ™‚ but after installing, in the project root, i get this:
FabianClemenz
FabianClemenzβ€’12mo ago
skirianov
skirianovβ€’12mo ago
πŸ€” ultra weird. @rohrig can you please take a look at the published package ah πŸ‘οΈ @fabianclemenz you made a typo
FabianClemenz
FabianClemenzβ€’12mo ago
i c πŸ˜„
skirianov
skirianovβ€’12mo ago
it's @vue-storefront/cli - not @vue-storefron
FabianClemenz
FabianClemenzβ€’12mo ago
sigh worked πŸ˜„ thanks^^