Comments (4)
This may only be breaking with Angular 5 (which I'm currently using), as I see code like this still in the project:
import 'rxjs/add/operator/map';
indicating it hasn't been migrated. Perhaps there are no plans or time to do so.
from meanauthapp.
I'm also facing this. Any idea how to tackle this?
from meanauthapp.
@ryanwells-rwc are you running this on a localhost or deployed? Update the app.js with this code
// Port Number
const port = process.env.PORT || 8080;
If you are running test from local host you need that set to 3000 and have to have 1 console @project root running npm start or nodemon in port 3000. The other console is running at Angular-src with ng serve (port 4200).
I have forked this repo and will sending changes soon. I am using Angular 5 and it works deployed.
from meanauthapp.
@ryanwells-rwc you are getting that error because the code has been finalized for deployment and no longer contains the http://localhost:3000 in the Auth.service.ts file in front of user/register. The port was changed in App.js to PORT || 8080 for deployment to heroku, you can comment that out and put const port = 3000;
You have to add back the code like this for local testing in auth.services.ts
return this.http.post('http://localhost:3000/users/register', user, {headers: headers})
do the same for authenticate and profile. After that change and the app.js change to port 3000 you can run ng serve in angular-src (root) for port 4200. From the project root run another console with npm start or nodemon and that will run the backend at localhost 3000. If you browse to Localhost:4200 you will have the main page. Hope this helps anyone.
from meanauthapp.
Related Issues (20)
- getting unauthorized in passport.js HOT 11
- unauthorized when posting users/profile-2 HOT 11
- Changes in HTML files not reflecting HOT 5
- .gitignore file is missing
- cannot create a new component in the components folder HOT 2
- Check if user with email already exists
- Heroku deploy not working HOT 4
- You have to be inside an angular-cli project in order to use the serve command.
- if(data.success) error HOT 1
- Mongoose showing null object though collection exists in MongoDB
- User password returned in the jwt token
- SyntaxError: Unexpected token < in JSON at position 0 HOT 4
- Crashing server on POST request - PT3 HOT 1
- logging (jwt_payload) shows nothing
- Authenticate error in Postman HOT 1
- getting unauthorized in passport.js HOT 2
- 'flash-messages' is not a known element:
- Property 'user' does not exist on type 'Object'
- change your code like this
- Hey I am getting the same issue while registering. Did you find the solution?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meanauthapp.