Starts in:
2 DAYS
1 HR
52 MIN
28 SEC
Starts in:
2 D
1 H
52 M
28 S
Open Closed

Abp Cli switch-to-preview gives an error. #6248


User avatar
0
cangunaydin created
  • ABP Framework version: v7.4.0
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:

Package: "Volo.Abp.TextTemplateManagement.Application.Contracts-v8.0.0-rc.2" is up to date. Package: "Volo.Abp.Gdpr.Application.Contracts-v8.0.0-rc.2" is up to date. Package: "Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX-v3.0.0-rc.1" is up to date. Package: "Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX-v3.0.0-rc.1" is up to date. Checking installed npm global packages... Checking installed npm global packages... Updated @abp/ng.components to ~8.0.0-rc.2 in /angular/package.json. Updated @abp/ng.core to ~8.0.0-rc.2 in /angular/package.json. Updated @abp/ng.oauth to ~8.0.0-rc.2 in /angular/package.json. One or more errors occurred. (startIndex ('-1') must be a non-negative value. (Parameter 'startIndex') Actual value was -1.) System.AggregateException: One or more errors occurred. (startIndex ('-1') must be a non-negative value. (Parameter 'startIndex') Actual value was -1.) ---> System.ArgumentOutOfRangeException: startIndex ('-1') must be a non-negative value. (Parameter 'startIndex') Actual value was -1. at System.ArgumentOutOfRangeException.ThrowNegative[T](T value, String paramName) at System.String.ThrowSubstringArgumentOutOfRange(Int32 startIndex, Int32 length) at System.String.Substring(Int32 startIndex, Int32 length) at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.ExtractVersions(String output) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 357 at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.GetPackageVersionList(JProperty package, String workingDirectory) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 348 at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.GetLatestVersion(JProperty package, Boolean includeReleaseCandidates, Boolean includePreviews, String workingDirectory) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 274 at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.TryUpdatingPackage(String filePath, JProperty package, Boolean includePreviews, Boolean includeReleaseCandidates, Boolean switchToStable, String specifiedVersion) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 238 at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.UpdatePackagesInFile(String filePath, Boolean includePreviews, Boolean includeReleaseCandidates, Boolean switchToStable, String specifiedVersion) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 179 at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.<>c__DisplayClass18_0.<<Update>g__UpdateAsync|0>d.MoveNext() in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 83 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.WaitAllCore(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.WaitAll(Task[] tasks) at Volo.Abp.Cli.ProjectModification.NpmPackagesUpdater.Update(String rootDirectory, Boolean includePreviews, Boolean includeReleaseCandidates, Boolean switchToStable, String version) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\NpmPackagesUpdater.cs:line 89 at Volo.Abp.Cli.ProjectModification.PackagePreviewSwitcher.SwitchSolutionsToPreview(List`1 solutionPaths) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\PackagePreviewSwitcher.cs:line 83 at Volo.Abp.Cli.ProjectModification.PackagePreviewSwitcher.SwitchToPreview(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\PackagePreviewSwitcher.cs:line 38 at Volo.Abp.Cli.Commands.SwitchToPreviewCommand.ExecuteAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\SwitchToPreviewCommand.cs:line 22 at Volo.Abp.Cli.CliService.RunInternalAsync(CommandLineArgs commandLineArgs) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\CliService.cs:line 169 at Volo.Abp.Cli.CliService.RunAsync(String[] args) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\CliService.cs:line 77

  • Steps to reproduce the issue:

when I try to switch from 7.4.0 to 8.0 preview with abp cli i got this error. Any fix I can do?


5 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share the /angular/package.json ? liming.ma@volosoft.com

    You can upgrade the NPM package to preview manually.

  • User Avatar
    0
    cangunaydin created

    Hello, I have done manually, everything works fine now. one question though on rider there are some shorcuts appeared because of abp cli i suppose. And since update failed it still persists i guess. is there any sideeffect to delete those files ends with abppkg.analyze.json

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    https://github.com/abpframework/abp/issues/17640#issuecomment-1778438889

  • User Avatar
    0
    cangunaydin created

    Hello again, I understand why now. i switch to mac, that's why it appears in my solution. Cause $(UserProfile) env variable not exists on mac. env variable is $(HOME) instead. I think you should use this instead on common.props file. $([System.Environment]::GetFolderPath(SpecialFolder.UserProfile))

    so you can support for each operating system. check this issue. https://github.com/dotnet/msbuild/issues/3908

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06