udacity-c2-restapi's Issues
Fix package.json
A couple of people have been reporting issue with sequelize. It seems that the older versions no longer work and an upgrade is required. Could you please update the package.json file's sequelize and sequelize-typescript to the latest versions?
I am using the following
"sequelize": "^5.9.0",
"sequelize-typescript": "^0.6.11"
bcrypt version out of date
Running npm install with a fresh clone results in
[email protected] install /Users/davidpechacek/aws-cloud-developer/udacity-c2-restapi/node_modules/bcrypt
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.5/bcrypt_lib-v3.0.5-node-v72-darwin-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
The specified gzip file no longer exists. Upgrading bcrypt to 3.0.6 works though.
UnhandledPromiseRejectionWarning: TypeError: sequelize_1.Model[(staticMethodPrefix + "conformOptions")] is not a function
After cloning the repo, installing dependencies, and updating db connection info I'm getting this error when I try to post a new feed. If I get the list of feeds (which are 0) everything works well.
Here is the stack:
(node:9850) UnhandledPromiseRejectionWarning: TypeError: sequelize_1.Model[(staticMethodPrefix + "conformOptions")] is not a function
at Function.BaseModel.prepareInstantiationOptions (/home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/node_modules/sequelize-typescript/lib/models/BaseModel.js:97:69)
at new Model (/home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/node_modules/sequelize-typescript/lib/models/v4/Model.js:8:45)
at new FeedItem (/home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/src/controllers/v0/feed/models/FeedItem.ts:17:9)
at Object.<anonymous> (/home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/src/controllers/v0/feed/routes/feed.router.ts:76:5)
at Generator.next (<anonymous>)
at /home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/src/controllers/v0/feed/routes/feed.router.ts:7:71
at new Promise (<anonymous>)
at __awaiter (/home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/src/controllers/v0/feed/routes/feed.router.ts:3:12)
at router.post (/home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/src/controllers/v0/feed/routes/feed.router.ts:55:15)
at Layer.handle [as handle_request] (/home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/node_modules/express/lib/router/layer.js:95:5)
at next (/home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/node_modules/express/lib/router/layer.js:95:5)
at /home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/node_modules/express/lib/router/index.js:281:22
at Function.process_params (/home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/node_modules/express/lib/router/index.js:335:12)
at next (/home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/node_modules/express/lib/router/index.js:275:10)
at Function.handle (/home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/node_modules/express/lib/router/index.js:174:3)
at router (/home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/node_modules/express/lib/router/index.js:47:12)
at Layer.handle [as handle_request] (/home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/node_modules/express/lib/router/index.js:317:13)
at /home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/home/cc/Projects/Udacity/cloud-developer-nd/udacity-c2-restapi/node_modules/express/lib/router/index.js:335:12)
(node:9850) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9850) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Any help/hint on how to solve it?
tslint.json error
In tslint.json, it specifies a rules directory of node_modules/codelyzer. However codelyzer is not in the package.json and there is nothing in the instructions about installing it. Removing it from the tslint.json file seems to work and tslint is working, but in server.ts alone there are many tslint errors.
Node v12.3.1 node-pre-gyp v0.12.0
With the latest node release the project does not npm install.
[email protected] install /home/emil/learning/udacity/cloud-engineer/udacity-c2-restapi/node_modules/bcrypt
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.5/bcrypt_lib-v3.0.5-node-v72-linux-x64-glibc.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI, glibc) (falling back to source compile with node-gyp)
.....
nvm install 10 and nvm use 10
Then it works.
Fix aws.ts
In the aws.ts file line 7, you need to change 'default' to c.aws_profile.
You catch it in your video, but did not update it in your source code. In order to prevent further confusion this should be updated.
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.