Problem/Motivation

The README file or getting-started.md the first step, after install modules is drush sdx:pm:install
But it seems this command do not exist.

Steps to reproduce

Try to install the latest version dev or alpha10

Proposed resolution

Update documentation if it works
or
Create new issues to fix and then

Remaining tasks

The Vue builder throws errors about packages conflicts

Comments

vasike created an issue. See original summary.

vzsigmond’s picture

Hey vasike, thanks for this.

sdx:pm:install is gone. It got removed in alpha3 when SDX switched the dependency model from one big sdx.packages.json to per-module {name}.sdx.yml manifests plus a resolved sdx.lock. The README, the getting-started guide, the Drush reference, and even a runtime error message all still pointed at it. My bad - that one slipped through. Patches landed on the 1.0.x branch, will ship in the next alpha.

The flow that works on alpha10 today:

composer require drupal/sdx
drush en sdx -y
drush sdx:init          # wizard picks framework / bundler / pm
drush sdx:resolve       # install npm packages into private://sdx/
drush sdx:doctor        # green check
drush sdx:build

Or the non-interactive version:

drush en sdx sdx_react sdx_vite sdx_npm -y    # or sdx_vue / sdx_svelte
drush sdx:resolve
drush sdx:doctor
drush sdx:build

Translation table for the old sdx:pm:* group if it helps:

Old (removed) New
sdx:pm:install sdx:resolve (whole workspace)
sdx:pm:install foo sdx:require foo
sdx:pm:remove foo sdx:remove foo
sdx:pm:list sdx:list
sdx:pm:rebuild sdx:resolve

I haven't really been focusing on sdx_vue lately. I've been deep into a few projects with sdx_react and trying to stick to one framework for now before I start generalizing things across the others. I assumed it was a manifest-side conflict and was about to ask you for sdx:resolve --dry-run output - then I tried to reproduce it locally with sdx_react + sdx_vue enabled side by side and it blew up exactly like you described. Two actual bugs piled on top of each other

  1. The build orchestrator was forgetting to tell the bundler what file extensions the framework cares about, so the Vite config defaulted to a React-shaped list (.tsx, .jsx, .js, .ts). Every .vue file got silently dropped on the floor at lookup time and Vite got a zero-entry rollup config - that gives you the "You must supply options.input to rollup" error from the bundler.
  2. Both sdx_react and sdx_vue register the same @sdx/app alias via hook_sdx_aliases(), each pointing at their own DrupalApp.tsx / Drupal.app,vue. The bundler was merging both contributions into one map, which means whoever was invoked last won the key - so the React build would happily try to parse DrupalApp.vue and explode.

Both fixed on 1.0.x, in the next alpha. The fix scopes file extensions and aliases per-framework, so React, Vue, and Svelte can be enabled at the same time without stepping on each other. Verified with React + Vue both building side by side on the dev site.

Happy to leave this open until you can confirm against the next alpha. If you want to try the fix before that, the 1.0.x branch in git is good to test against - any feedback on edge cases welcome.

vasike’s picture

Hi Valentin
thanks a lot for the feedback ... kind of one expected ... that's why the ticket info was so poor ... to get maximum ...
so thank you.

Still some issues with latest (I know not alpha yet):
But just to mention
- (old one) `sdx_typescript.settings` left behind on uninstall ... so it can't re-installed without deleting this.

- mount-coordinator.ts:97 [SDX React] Container has no data-component attribute.
Console error when trying to use in a theme template - with React example component or the example custom HeroBanner
And I think it worked in the past ... I remember I could see examples ... some months ago.

- https://git.drupalcode.org/project/sdx/-/blob/1.0.x/docs/guide/getting-s...
There is some issue with HeroBanner naming/identifier HeroBanner vs 'my_theme:hero-banner'

I think this is kind of solved, so Please feel free to close it.
If I have other issues I could create ...

p.s. (suggestion if I may) It would help also others if there were/are issues created for most of changes History ... but also for the next ones.

lblabr’s picture

i tried to install, without success an advices?

solved, executed composer in wrong directory

vasike’s picture

Status: Active » Fixed

I think this could be closed ...

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.