abp icon indicating copy to clipboard operation
abp copied to clipboard

Abp CLI error on Mac OS

Open tomlewandowski opened this issue 7 years ago • 9 comments

I have installed Abp CLI 0.18. I'm trying to create a new project by command: abp new Acme.Product -t mvc

and I get this error: 13:26:59 INF] ABP CLI (https://abp.io) [13:27:00 INF] Version 0.18.0 (Stable channel) [13:27:10 INF] Creating a new project... [13:27:10 INF] Project name: Acme.Product [13:27:11 INF] Using cached template: mvc, version: 0.18.0 [13:27:13 INF] Check the documentation of this template: https://docs.abp.io/en/abp/latest/Startup-Templates/Mvc [13:27:13 ERR] Path cannot be the empty string or all whitespace. Parameter name: path System.ArgumentException: Path cannot be the empty string or all whitespace. Parameter name: path at System.IO.Directory.CreateDirectory(String path) at Ionic.Zip.ZipEntry.InternalExtract(String baseDir, Stream outstream, String password) at Ionic.Zip.ZipFile._InternalExtractAll(String path, Boolean overrideExtractExistingProperty) at Volo.Abp.Cli.Commands.NewCommand.ExecuteAsync(CommandLineArgs commandLineArgs) in D:\Github\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\Commands\NewCommand.cs:line 66 at Volo.Abp.Cli.CliService.RunAsync(String[] args) in D:\Github\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\CliService.cs:line 56

I tried different variants with output path but i got the same error.

tomlewandowski avatar Jun 22 '19 11:06 tomlewandowski

Try using the -o parameter to specify the output directory first.

maliming avatar Jun 22 '19 11:06 maliming

I tried this but still the same error: abp new Acme.Product -o Product

tomlewandowski avatar Jun 22 '19 11:06 tomlewandowski

I don't know much about macos. Is Product a valid path? Under windows may be c:\myproduct

maliming avatar Jun 22 '19 11:06 maliming

When I use full path: /Volumes/SD/Workspace/originsoftware/Product/

like this: abp new Acme.Product -o /Volumes/SD/Workspace/originsoftware/Product/

then I got another error: [13:58:05 INF] ABP CLI (https://abp.io) [13:58:06 INF] Version 0.18.0-dev (Development channel) [13:58:06 INF] Installing yarn... (libuv) kqueue(): Too many open files in system tty.js:83 throw new ERR_TTY_INIT_FAILED(ctx); ^

SystemError [ERR_TTY_INIT_FAILED]: TTY initialization failed: uv_tty_init returned ENFILE (file table overflow) at new WriteStream (tty.js:83:11) at createWritableStdioStream (internal/process/stdio.js:145:16) at process.getStdout [as stdout] (internal/process/stdio.js:14:14) at module.exports (/usr/local/lib/node_modules/npm/node_modules/set-blocking/index.js:2:12) at Object. (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:11:1) at Module._compile (internal/modules/cjs/loader.js:736:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:747:10) at Module.load (internal/modules/cjs/loader.js:628:32) at tryModuleLoad (internal/modules/cjs/loader.js:568:12) at Function.Module._load (internal/modules/cjs/loader.js:560:3) [13:58:06 INF] Installing gulp... (libuv) kqueue(): Too many open files in system tty.js:83 throw new ERR_TTY_INIT_FAILED(ctx); ^

SystemError [ERR_TTY_INIT_FAILED]: TTY initialization failed: uv_tty_init returned ENFILE (file table overflow) at new WriteStream (tty.js:83:11) at createWritableStdioStream (internal/process/stdio.js:145:16) at process.getStdout [as stdout] (internal/process/stdio.js:14:14) at module.exports (/usr/local/lib/node_modules/npm/node_modules/set-blocking/index.js:2:12) at Object. (/usr/local/lib/node_modules/npm/node_modules/npmlog/log.js:11:1) at Module._compile (internal/modules/cjs/loader.js:736:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:747:10) at Module.load (internal/modules/cjs/loader.js:628:32) at tryModuleLoad (internal/modules/cjs/loader.js:568:12) at Function.Module._load (internal/modules/cjs/loader.js:560:3) [13:58:07 INF] Creating a new project... [13:58:07 INF] Project name: Acme.Product [13:58:07 ERR] Too many open files in system System.Net.Http.HttpRequestException: Too many open files in system ---> System.Net.Sockets.SocketException: Too many open files in system at System.Net.Sockets.Socket..ctor(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType) at System.Net.Sockets.DualSocketMultipleConnectAsync..ctor(SocketType socketType, ProtocolType protocolType) at System.Net.Sockets.Socket.ConnectAsync(SocketType socketType, ProtocolType protocolType, SocketAsyncEventArgs e) at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) at System.Threading.Tasks.ValueTask1.get_Result() at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Threading.Tasks.ValueTask1.get_Result() at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask1 creationTask) at System.Threading.Tasks.ValueTask1.get_Result() at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts) at Volo.Abp.Cli.ProjectBuilding.AbpIoTemplateStore.GetLatestTemplateVersionAsync(String name) at Volo.Abp.Cli.ProjectBuilding.AbpIoTemplateStore.GetAsync(String name, DatabaseProvider databaseProvider, String projectName, String version) at Volo.Abp.Cli.ProjectBuilding.ProjectBuilder.BuildAsync(ProjectBuildArgs args) at Volo.Abp.Cli.Commands.NewCommand.ExecuteAsync(CommandLineArgs commandLineArgs) at Volo.Abp.Cli.CliService.RunAsync(String[] args)

On Windows everything works great.

tomlewandowski avatar Jun 22 '19 12:06 tomlewandowski

We will try on the mac, thanks for feedback.

maliming avatar Jun 22 '19 12:06 maliming

E162ECE5A044129FD190144A5BDAFFE1 EA2FC8FE23235A0041A161528CCF6BFF I also encountered the same problem.

cdlian avatar Jun 25 '19 11:06 cdlian

We will change Ionic in the next release: https://github.com/abpframework/abp/issues/1114

After this change, you can reopen this issue if you have still problems. Now, closing this one.

hikalkan avatar Jun 25 '19 11:06 hikalkan

Hey @hikalkan now the project is created correctly, but there is another problem. In the csproj files, the references look like this:

 <ItemGroup>
    <PackageReference Include="..\..\..\..\framework\src\Volo.Abp.Ddd.Application\Volo.Abp.Ddd.Application" Version="0.18.1" />
  </ItemGroup>

and dotnet restore can not find packages on nuget. Should the references look like this?:

 <ItemGroup>
    <PackageReference Include="Volo.Abp.Ddd.Application" Version="0.18.1" />
  </ItemGroup>

tomlewandowski avatar Jun 29 '19 18:06 tomlewandowski

see:https://github.com/abpframework/abp/issues/1389

maliming avatar Jun 29 '19 23:06 maliming