wittlock/ngx-image-zoom

"ERROR: An unhandled exception occurred: No projects support the 'serve' target." when trying to serve project

Closed this issue · 4 comments

I have cloned this repository and created my own branch. After 'npm i' I try and start the project by either ng serve, npm start, or yarn start, but instead I am returned this console error:

[error] Error: No projects support the 'serve' target. at ServeCommand.initialize (/Users/user/proj/ngx-image-zoom/node_modules/@angular/cli/models/architect-command.js:53:19) at async ServeCommand.validateAndRun (/Users/user/proj/ngx-image-zoom/node_modules/@angular/cli/models/command.js:124:9) at async Object.runCommand (/Users/user/proj/ngx-image-zoom/node_modules/@angular/cli/models/command-runner.js:201:24) at async default_1 (/Users/user/proj/ngx-image-zoom/node_modules/@angular/cli/lib/cli/index.js:62:31)

I made sure the project names matched up in the angular.json and package.json following the advice of some help via google, but I still get this error.

Any help is appreciated!

Hi there,
This project is just a library, it does not run on its own in any fashion. If you want to work on development in it, then I recommend using npm link in your ngx-image-zoom directory and then npm link ngx-image-zoom in a testing project you create elsewhere. Then doing npm run build:watch in this project will have it live watch changes and your testproject with ng serve should get changes as you do them in the library.

Ahh I see. That would make sense lol.

Thanks!

I have troubles running npm run build:watch, as I get the error "Missing script build:watch", do you have any solution to that by any chance?

Still there is a problem..