Aurelia CLI - No project found

A friend of mine is just starting with Aurelia. He’s on Windows 10 and I suggested the Aurelia CLI to get started.

We’ve checked that the Node version and NPM versions are up-do-date, but when he attempts to create a new project the CLI using au new it just prints No Aurelia project found and exits.

I’ve tested this on my windows 10 x64 VM and haven’t been able to reproduce the issue. The odd thing is I was told the same thing by another windows user last week.

Has anybody else seen this behavior? I assume it must be some system dependency missing but not sure what it would be.

1 Like

That happens when the folder you run au new got sub folder node_modules. I was caught by this the day before, but had not investigated yet.

When aurelia-cli sees node_modules, I guess it thinks it’s working inside an existing aurelia project.

update the condition is, there is local node_modules folder, and there is aurelia-cli package installed in it.

1 Like

Ah nice catch, thank you! I’ll check with my friend to see if that’s the case in his scenario. Ideally the CLI should at least give some indication that this is why it exited early. May raise it as an issue once verified.

Hmm, can’t repo that behavior on my machine either. Even with a node_modules sub-directory the CLI still shows the correct next prompt to allow me to proceed and create the project rather than exiting early.

Yes, please create an issue.

Me too, I checked again, the condition is, there is local node_modules folder, and there is aurelia-cli package installed in it!

2 Likes

Yep, was able to reproduce it now, thanks for clarifying :grinning: will raise an issue to track.

In case anyone else runs into this issue. The resolution steps are:

  1. Remove the local node_modules directory
  2. Install the CLI globally with npm install aurelia-cli -g
  3. Run the au new command which should now work correctly

Issue reference https://github.com/aurelia/cli/issues/977.

1 Like