aelayeb aelayeb - 10 months ago 111
Dart Question

Aqueduct/Dart new project command fails on Windows 7

I'm trying to create a project with the aqueduct command but I get the following errors :

C:\Users\Aelayeb>aqueduct create -n web_dart
Fetching Aqueduct as:
aqueduct: "any"
Determining Aqueduct template source...
ProcessException: Le fichier sp├®cifi├® est introuvable.

Command: pub get --no-packages-dir

It is written "File not found" (in french).

Also, I skipped the "aqueduct setup" step from the documentation because it fails to find psql and I don't need a database for this project.
After seeing the code for this setup step, I don't think it's mandatory (setup_command.dart).

But if I'm doing something wrong, or someone have an idea about the error, it would really helps me.
Btw, I'm testing this on a Windows 7 64bits computer.

Answer Source

Basically it seems that the command fails to switch directory before executing "pub get --no-packages-dir".

So when I replay "pub get" in the right directory, it seems to work.

EDIT : It's a problem with dart "Process.runSync()" method on windows which doesn't use the "PATH" env. When adding the "runInShell: true" parameters it seems to work. More details here : github

The question now is : Is it working as intended ?