Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command invalid: run always ask to create a project

Tags:

aurelia

I have a project about 4 months and suddenly the aurelia's CLI commands are not working.

When I try to execute au run --watch I receive a message with options to create a new project under the path.

I have already tried to uninstall and reinstall the aurelia CLI, It's not work.

The last thing I have done was to execute a git clean -xdf

I think that could be something on my project. Someone could help me?

ANSWER

After some attempts I fixed the problem:

1) I reinstall Git and Node;

2) I have deleted all the files under the \AppData\Roaming\npm-cache path;

3) I have checked if the Git and Node were in the PATH of environment variables;

4) I run the npm install command;

like image 830
Felipe Santana Avatar asked Jan 26 '17 18:01

Felipe Santana


1 Answers

Is aurelia-cli included in the devDependencies of the project and also installed globally?


First, install globally:

  • npm i -g aurelia-cli

Then, in the project directory, install & save to devDependencies:

  • npm i --save-dev aurelia-cli


You should then be able to run au in the project directory and see that the build and run commands are now available.

Note that you'll also need to install the necessary gulp dependencies required by the tasks in your project devDependencies.



EDIT: See aurelia/cli/issues/485 which confirms that installing aurelia-cli as a local dependency fixes this issue.

like image 124
sbolel Avatar answered Oct 20 '22 05:10

sbolel