rpaschoal / ng-chat

💬 A simple facebook/linkedin lookalike chat module for Angular applications.
MIT License
155 stars 92 forks source link

Installation problem (Angular version issue???) #99

Closed gary-stewart closed 5 years ago

gary-stewart commented 5 years ago

Hi. I'm trying to get your ng-chat-nodejs sample application running as a first step. I followed the instructions in readme.md file and get as far as getting the node application running. It fails when I open terminal window and run "ng serve --open" with the error message "The serve command requires to be run in an Angular project, but a project definition could not be found.".

Some of my research suggests that its an Angular versioning problem. The recommended solution is running the following command to upgrade the project to the latest version of Angular: ng update @angular/cli --migrate-only --from=

I have installed Angular globally previously and have run other new Angular projects. My version of Angular is 7.1.4. What makes me think the error is generated by an Angular versioning problem is that when I run "ng --version" in one of my other Angular projects it indicates the Angular version as "7.1.4", but when I run it in the "ng-chat-nodejs" directory it says the Angular version is "undefined". Also when I've tried to import your module in another project, there are errors with the import module references.

So if you could indicate what Angular version your module was developed in and/or the latest Angular version it is updated for. Any other advice or insights would be useful.

This looks like a really great module. Really looking forward to getting this working. Thanks in advance. PS:

  1. If this is a versioning problem, any advice on upgrading the ng-chat module to work in a current version of Angular project.
  2. Would like to add users entering emojis, and am thinking of using angular-emoji module. Any advice?
rpaschoal commented 5 years ago

Hi @gary-stewart , sorry about the late response as I was on holidays.

Hmm, should be pretty straight forward to run it, you might have executed ng serve --open in the wrong directory. You have to start the Node project and then go to the Angular example project and run ng serve --open.

In terms of Angular version, when I started to build this module it would run all the way from 2.0.0 to most recent (4 or 5 at the time). This might not be the case anymore as I've upgraded a couple key things such as RxJS and a couple other dependencies. If you're running on Angular 6 or 7 you should be fine.

I'm working at the moment on a new net core demo using Azure SignalR. I might finish it by next week I believe. Could be another good demo for you to try running locally once it is finished.

On your questions:

  1. As above, I don't believe there is much to be done. I just ran it locally to be sure and all I did was: Run npm run start on the root folder, open another terminal session and go into the angular-cli folder and run ng serve --open. Let me know if you get any errors by following these steps.
  2. There's already support for unicode emojis. Just go to the online demo site and type something like :). Would be nice if we could make this a bit nicer to the end user and put a range of emojis he can pick through the UI or even some GIPHYs. Not in my todo list at the moment but community pull requests are always welcome!
rpaschoal commented 5 years ago

Hi @gary-stewart ,

If you're still interested in getting a local demo running, I've just deployed the new demo with SignalR integration.

The source code can be found here: https://github.com/rpaschoal/ng-chat-netcoreapp

There isn't any instructions on how to get it running but it is a fairly small code base. If you're familiar with .net and asp.net development you'll be able to get it running pretty quick. I'll be adding some instructions there next week and will be releasing version 2.0.0 as well with a small bug fix for CSS on file attachments.

I'll be removing the offline demo and the signalr projects from this repository prior to releasing 2.0.0.

Cheers.