Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@spartan-ng/cli:ui does not work (alpha.380) #532

Open
1 of 2 tasks
hillin opened this issue Dec 17, 2024 · 6 comments
Open
1 of 2 tasks

@spartan-ng/cli:ui does not work (alpha.380) #532

hillin opened this issue Dec 17, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@hillin
Copy link
Contributor

hillin commented Dec 17, 2024

Please provide the environment you discovered this bug in.

Angular 19.0.0
Angular CDK 19.0.3
@spartan-ng/ui-core: 0.0.1-alpha.380
@spartan-ng/cli: 0.0.1-alpha.380

Which area/package is the issue in?

Don't know / other

Description

ng g @spartan-ng/cli:ui
Configuration file not found, creating a new one...
√ Choose a directory to place your spartan libraries, e.g. libs/ui · libs/ui
√ Choose which primitives you want to copy · all
...
yarn install v1.22.22
[1/4] Resolving packages...
error Couldn't find package "@spartan-ng/brain/collapsible" on the "npm" registry.

The ng g @spartan-ng/cli:ui command generates invalid package references:

    "@spartan-ng/brain/collapsible": "0.0.1-alpha.380",
    "@spartan-ng/brain/dialog": "0.0.1-alpha.380",
    "@spartan-ng/brain/forms": "0.0.1-alpha.380",

After manually replacing them with:

    "@spartan-ng/ui-collapsible-brain": "0.0.1-alpha.380",
    "@spartan-ng/ui-forms-brain": "0.0.1-alpha.380",
    "@spartan-ng/ui-dialog-brain": "0.0.1-alpha.380",  // already existed

yarn install v1.22.22
[1/4] Resolving packages...
Couldn't find any versions for "@spartan-ng/ui-collapsible-brain" that matches "0.0.1-alpha.380"
? Please choose a version of "@spartan-ng/ui-collapsible-brain" from this list: (Use arrow keys)
0.0.1-alpha.374

Apparently none of the brain packages have version 0.0.1-alpha.380. Manually replacing the version numbers to .374 can fix this problem.

Please provide the exception or error you saw

No response

Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@hillin hillin added the bug Something isn't working label Dec 17, 2024
@hillin
Copy link
Contributor Author

hillin commented Dec 17, 2024

The command also misses a reference to the @spartan-ng/ui-tooltip-brain package.

@goetzrobin goetzrobin self-assigned this Dec 17, 2024
@hillin
Copy link
Contributor Author

hillin commented Dec 17, 2024

Apparently the cli should not generate reference to any of the @spartan-ng/ui-(.+)-brain packages now, they are all packed into the @spartan-ng/brain package.

@beyerleinf
Copy link

beyerleinf commented Dec 19, 2024

I also found that the ui packages are missing version 0.0.1-alpha.380 so the install fails. When changing it to the latest available version, there are peer dependency conflicts

@hillin
Copy link
Contributor Author

hillin commented Dec 20, 2024

@beyerleinf you should remove all the @spartan-ng/ui-(.+)-brain packages.

@ashley-hunter
Copy link
Collaborator

Hi, so we have consolidated all the brain libraries into a single library. This is a breaking change, however we do have a generator you can run to automatically update imports etc.. automatically.

You can run the following to update your codebase:

ng g @spartan-ng/cli:migrate-brain-imports

If you run this and have further issues let us know and we can try and resolve it, thanks!

@samsonkumawong
Copy link

is it because the package not found on npmjs? https://www.npmjs.com/package/@spartan-ng/brain/collapsible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants