
Maikol Diaz Hoya
Pregunta(node:16972) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token u in JSON at position
0
at JSON.parse (<anonymous>)
at app.post (C:\Users\MaikolDiaz\Desktop\ProjectsJs\JS\jsnode\routes\api\films.js:15:27)
at Layer.handle [as handle_request] (C:\Users\MaikolDiaz\Desktop\ProjectsJs\JS\jsnode\node_modules\express\lib\router\layer.js:95:5)
at next (C:\Users\MaikolDiaz\Desktop\ProjectsJs\JS\jsnode\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (C:\Users\MaikolDiaz\Desktop\ProjectsJs\JS\jsnode\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (C:\Users\MaikolDiaz\Desktop\ProjectsJs\JS\jsnode\node_modules\express\lib\router\layer.js:95:5)
at C:\Users\MaikolDiaz\Desktop\ProjectsJs\JS\jsnode\node_modules\express\lib\router\index.js:281:22
at Function.process_params (C:\Users\MaikolDiaz\Desktop\ProjectsJs\JS\jsnode\node_modules\express\lib\router\index.js:335:12)
at next (C:\Users\MaikolDiaz\Desktop\ProjectsJs\JS\jsnode\node_modules\express\lib\router\index.js:275:10)
at C:\Users\MaikolDiaz\Desktop\ProjectsJs\JS\jsnode\node_modules\body-parser\lib\read.js:130:5
(node:16972) 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:16972) [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.
ayuda

Edward Steven Ramos Palacios
De seguro estas intentando parsear un objeto a JSON con una estructura que bien, o ya es un json, o no está bien formateado. Cuál es tu intención para usar el
JSON.parse

Juan Castro
:wave: ¡Hola! :thinking: ¿Puedes mostrarme tu código? Así buscamos dónde está el error y cómo solucionarlo. :muscle: