Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Udacity-c2-restapi exercise issue #464

Open
abdelrazek-alaa opened this issue Jul 12, 2022 · 3 comments
Open

Udacity-c2-restapi exercise issue #464

abdelrazek-alaa opened this issue Jul 12, 2022 · 3 comments

Comments

@abdelrazek-alaa
Copy link

I had an issue running the udacity-c2-restapi exercise to follow along with the lesson . and I had managed to workaround this and I thought this fix might be helpful for anyone facing the same issue.

Steps :
1- Delete package-lock.json ❌
2. Update all the npm dependencies to their latest version : here's how

Upon running the app you'll face this typescript error. 👇
error
The easiest way to fix would be by applying this change to FeedItem and User models at:
src\controllers\v0\feed\models\FeedItem.ts
src\controllers\v0\users\models\User.ts
delete

- export class User extends Model<User>
+ export class User extends Model
- export class FeedItem extends Model<FeedItem>
+ export class FeedItem extends Model

Hope this helps 🙂

@michealgabriel
Copy link

It seems your solution works out however there's an error encountered at run time
error_ss

I also have a friend who's stuck here, any help would be appreciated ⭐

@mwahab25
Copy link

I have issue that the command "npm run dev" not working and not generate server http://localhost:8081/

image

@SudKul
Copy link
Contributor

SudKul commented Aug 30, 2022

Udacity does not recommend changing the package.json because the application code may not be compatible with newer package versions. However, you can regenerate package-lock.json if needed.
Use Node 12 for the desired experience.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants