Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- info Connected to MongoDB!
- info Started listening on port:5000
- Finish
- (node:31354) UnhandledPromiseRejectionWarning: TypeError: Cannot read p
- roperty 'length' of undefined
- at fileUploader (/home/ubuntu/ph-ee-api-sandbox/fileUploader.js:24:
- 36)
- at process._tickCallback (internal/process/next_tick.js:68:7)
- (node:31354) UnhandledPromiseRejectionWarning: Unhandled promise reject
- ion. This error originated either by throwing inside of an async functi
- on without a catch block, or by rejecting a promise which was not handl
- ed with .catch(). (rejection id: 1)
- (node:31354) [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.
- events.js:174
- throw er; // Unhandled 'error' event
- ^
- TypeError: data.json is not a function
- at /home/ubuntu/ph-ee-api-sandbox/fileUploader.js:21:6
- at process.nextTick (/home/ubuntu/ph-ee-api-sandbox/node_modules/mo
- ngoose/lib/model.js:4868:18)
- at process._tickCallback (internal/process/next_tick.js:61:11)
- Emitted 'error' event at:
- at process.nextTick (/home/ubuntu/ph-ee-api-sandbox/node_modules/mo
- ngoose/lib/model.js:4870:15)
- at process._tickCallback (internal/process/next_tick.js:61:11)
- npm ERR! code ELIFECYCLE
- npm ERR! errno 1
- npm ERR! ph-ee-api-sandbox@1.0.0 start: `node index.js "nodemon"`
- npm ERR! Exit status 1
- npm ERR!
- npm ERR! Failed at the ph-ee-api-sandbox@1.0.0 start script.
- npm ERR! This is probably not a problem with npm. There is likely addit
- ional logging output above.
- npm ERR! A complete log of this run can be found in:
- npm ERR! /home/ubuntu/.npm/_logs/2021-07-20T08_07_28_774Z-debug.log
Advertisement
Add Comment
Please, Sign In to add comment