TiagoSilvaPereira / vemto2-issues

Repository to track Vemto 2 Issues
5 stars 0 forks source link

ENOENT: no such file or directory, open 'C:/laragon/www/vemtov2/package.json' #50

Closed respodeveloper closed 7 months ago

respodeveloper commented 7 months ago

When creating a new application via New App, this error shows up after a success message ( App created successfully) and error message is ( This folder is not a Laravel project)

Error Message: ENOENT: no such file or directory, open 'C:/laragon/www/vemtov2/package.json'

Stack:

Error: ENOENT: no such file or directory, open 'C:/laragon/www/vemtov2/package.json'
    at Object.openSync (node:fs:585:3)
    at Object.func [as openSync] (node:electron/js2c/asar_bundle:5:1812)
    at Object.readFileSync (node:fs:453:35)
    at e.readFileSync (node:electron/js2c/asar_bundle:5:9160)
    at $p.readFile (C:\Program Files\Vemto\resources\app.asar\build\src\main\main.js:1:5015)
    at C:\Program Files\Vemto\resources\app.asar\build\src\main\main.js:16:5792
    at C:\Program Files\Vemto\resources\app.asar\build\src\main\main.js:1:6782
    at Generator.next (<anonymous>)
    at C:\Program Files\Vemto\resources\app.asar\build\src\main\main.js:1:6611
    at new Promise (<anonymous>)

image


Vemto 2.0.6 win32 10.0.19045 Locale: en-US App version: 2.0.6

TiagoSilvaPereira commented 7 months ago

Hi, @respodeveloper, did you select a folder and type a project name? I just saw the validation is failing and allowing to create a project without a name, I'll fix this in the next version

martin-arvisais commented 7 months ago

I've got the same issue. I select a folder, and enter a project name. JetStream + team, Mysql

TiagoSilvaPereira commented 7 months ago

I've got the same issue. I select a folder, and enter a project name.

Could you please try running Vemto 2 from command line and check if there is an error message during the project creation steps?

respodeveloper commented 7 months ago

I've got the same issue. I select a folder, and enter a project name.

Could you please try running Vemto 2 from command line and check if there is an error message during the project creation steps?

What's the command for running it in cli ?

TiagoSilvaPereira commented 7 months ago

I've got the same issue. I select a folder, and enter a project name.

Could you please try running Vemto 2 from command line and check if there is an error message during the project creation steps?

What's the command for running it in cli ?

From Windows, you can go to the Vemto installation path from command line and run:

start Vemto.exe

So you can check the whole stdout content in the terminal while executing actions on Vemto:

image

TiagoSilvaPereira commented 7 months ago

@respodeveloper @martin-arvisais also please check if the folders were created correctly and if you can connect manually to them

respodeveloper commented 7 months ago

@TiagoSilvaPereira This is the Log from cmd log, after starting vemto from cli

C:\Users\bongani>vemto.exe

C:\Users\bongani>
Checking for update
Update for version 2.0.6 is not available (latest version: 2.0.6, downgrade is disallowed).
checkForUpdatesAndNotify called, downloadPromise is null
(stderr) FAILED to execute command: composer create-project laravel/laravel:^11.0 testfromcmd

Creating a "laravel/laravel:11.0" project at "./testfromcmd"
Cannot use laravel/laravel's latest version v11.0.0 as it requires php ^8.2 which is not satisfied by your platform.

In CreateProjectCommand.php line 421:

  Could not find package laravel/laravel with version 11.0 in a version installable using your PHP version, PHP exten
  sions and Composer version.

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package> [<directory> [<version>]]]

Creating a "laravel/laravel:11.0" project at "./testfromcmd"
Cannot use laravel/laravel's latest version v11.0.0 as it requires php ^8.2 which is not satisfied by your platform.

In CreateProjectCommand.php line 421:

  Could not find package laravel/laravel with version 11.0 in a version installable using your PHP version, PHP exten
  sions and Composer version.

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package> [<directory> [<version>]]]

Error: Error: Command failed: composer create-project laravel/laravel:^11.0 testfromcmd
Creating a "laravel/laravel:11.0" project at "./testfromcmd"
Cannot use laravel/laravel's latest version v11.0.0 as it requires php ^8.2 which is not satisfied by your platform.

In CreateProjectCommand.php line 421:

  Could not find package laravel/laravel with version 11.0 in a version installable using your PHP version, PHP exten
  sions and Composer version.

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package> [<directory> [<version>]]]

Stdout:
(error) FAILED to execute command: composer create-project laravel/laravel:^11.0 testfromcmd

Error: Command failed: composer create-project laravel/laravel:^11.0 testfromcmd
Creating a "laravel/laravel:11.0" project at "./testfromcmd"
Cannot use laravel/laravel's latest version v11.0.0 as it requires php ^8.2 which is not satisfied by your platform.

In CreateProjectCommand.php line 421:

  Could not find package laravel/laravel with version 11.0 in a version installable using your PHP version, PHP exten
  sions and Composer version.

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package> [<directory> [<version>]]]

    at ChildProcess.exithandler (node:child_process:407:12)
    at ChildProcess.emit (node:events:527:28)
    at maybeClose (node:internal/child_process:1092:16)
    at ChildProcess._handle.onexit (node:internal/child_process:302:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: 'composer create-project laravel/laravel:^11.0 testfromcmd'
}
(error) FAILED to execute command: "php" artisan storage:link

Error: spawn C:\WINDOWS\system32\cmd.exe ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:478:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn C:\\WINDOWS\\system32\\cmd.exe',
  path: 'C:\\WINDOWS\\system32\\cmd.exe',
  spawnargs: [ '/d', '/s', '/c', '""php" artisan storage:link"' ],
  cmd: '"php" artisan storage:link'
}
(error) FAILED to execute command: composer require laravel/jetstream --no-interaction

Error: spawn C:\WINDOWS\system32\cmd.exe ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:478:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn C:\\WINDOWS\\system32\\cmd.exe',
  path: 'C:\\WINDOWS\\system32\\cmd.exe',
  spawnargs: [
    '/d',
    '/s',
    '/c',
    '"composer require laravel/jetstream --no-interaction"'
  ],
  cmd: 'composer require laravel/jetstream --no-interaction'
}
(error) FAILED to execute command: "php" artisan jetstream:install livewire --no-interaction

Error: spawn C:\WINDOWS\system32\cmd.exe ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:478:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn C:\\WINDOWS\\system32\\cmd.exe',
  path: 'C:\\WINDOWS\\system32\\cmd.exe',
  spawnargs: [
    '/d',
    '/s',
    '/c',
    '""php" artisan jetstream:install livewire --no-interaction"'
  ],
  cmd: '"php" artisan jetstream:install livewire --no-interaction'
}
Writing File: C:/laragon/www/testfromcmd/.env
TiagoSilvaPereira commented 7 months ago

@respodeveloper ok, seems the problem is your PHP version, as you can see:

Cannot use laravel/laravel's latest version v11.0.0 as it requires php ^8.2 which is not satisfied by your platform.

Just upgrade it to 8.2+ and it will probably work.

Also we'll fix this to correctly show the error message when the command fails.

martin-arvisais commented 7 months ago

I switch to PHP 8.3 and now it work great!

respodeveloper commented 7 months ago

is it possible to choose which laravel version to install , we are still using laravel 10 ?

respodeveloper commented 7 months ago

Updated php version , its working now. I think maybe for future, it would be nice to be able to specify the laravel version when creating projects so it pulls the one you using for your projects compared to latest version. 👍🏾👍🏾