You have to be inside an angular-cli project in order to use the serve command

if ng serve doesn't work try npm start.

I don't know the exact reason, but for me it works !!


If I understand you correctly, you want to run the dragula demo.

Apparently dragula was not created using an angular cli project. So running the ng serve command from the demo folder will not yield any results.

Instead you should run the application using node.

First update your angular CLI to make sure it is the most recent version.

npm install -g @angular/cli@latest

or

yarn global add @angular/cli@latest

Next install all dependencies by executing npm install or npm i from the directory you downloaded the package to. This downloads and installs all the dependencies mentioned in the package.json file and their dependencies.

Then you can run the development build by using the npm start command. This will transpile the typescript and creates a webpack that can be accessed using the url given in the console (http://localhost:4200 by default). You could also try to use the ng serve command again.


Try installing npm install -g @angular/cli@latest since the angular-cli has been renamed.

Tags:

Angular