Macbook M1 出现 JSON 输入意外结束的问题 POSTMAN 没有端点工作 [已关闭]

Macbook M1 having issues with Unexpected end of JSON input POSTMAN no endpoints work [closed]

提问人:Matthew Monti 提问时间:11/16/2023 最后编辑:David MakogonMatthew Monti 更新时间:11/16/2023 访问量:34

问:


编辑问题以包括所需的行为、特定问题或错误以及重现问题所需的最短代码。这将帮助其他人回答这个问题。

7天前关闭。

PLEASE SEE MOVI-API code on my GitHub profile. 
check listen 8080
lastest programs (possible software conflict?)
End points works on non apple machine.
Stressful tech support from node.js and apple. 
https://github.com/MatthewMonti
///TERMINAL CODE BELOW

> [email protected] devStart
> nodemon server.js

[nodemon] 3.0.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node server.js`
(node:18169) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Your app is listening on port 8080.
Mongoose Connected
::1 - - [15/Nov/2023:19:32:24 +0000] "GET / HTTP/1.1" 400 1344
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at createStrictSyntaxError (/Users/matthewmonti/Documents/GitHub/movie-api/express/node_modules/express/node_modules/body-parser/lib/types/json.js:160:10)
    at parse (/Users/matthewmonti/Documents/GitHub/movie-api/express/node_modules/express/node_modules/body-parser/lib/types/json.js:83:15)
    at /Users/matthewmonti/Documents/GitHub/movie-api/express/node_modules/express/node_modules/body-parser/lib/read.js:128:18
    at AsyncResource.runInAsyncScope (node:async_hooks:206:9)
    at invokeCallback (/Users/matthewmonti/Documents/GitHub/movie-api/express/node_modules/express/node_modules/raw-body/index.js:231:16)
    at done (/Users/matthewmonti/Documents/GitHub/movie-api/express/node_modules/express/node_modules/raw-body/index.js:220:7)
    at IncomingMessage.onEnd (/Users/matthewmonti/Documents/GitHub/movie-api/express/node_modules/express/node_modules/raw-body/index.js:280:7)
    at IncomingMessage.emit (node:events:519:28)
    at endReadableNT (node:internal/streams/readable:1696:12)
::1 - - [15/Nov/2023:19:54:01 +0000] "GET / HTTP/1.1" 400 1344
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at createStrictSyntaxError (/Users/matthewmonti/Documents/GitHub/movie-api/express/node_modules/express/node_modules/body-parser/lib/types/json.js:160:10)
    at parse (/Users/matthewmonti/Documents/GitHub/movie-api/express/node_modules/express/node_modules/body-parser/lib/types/json.js:83:15)
    at /Users/matthewmonti/Documents/GitHub/movie-api/express/node_modules/express/node_modules/body-parser/lib/read.js:128:18
    at AsyncResource.runInAsyncScope (node:async_hooks:206:9)
    at invokeCallback (/Users/matthewmonti/Documents/GitHub/movie-api/express/node_modules/express/node_modules/raw-body/index.js:231:16)
    at done (/Users/matthewmonti/Documents/GitHub/movie-api/express/node_modules/express/node_modules/raw-body/index.js:220:7)
    at IncomingMessage.onEnd (/Users/matthewmonti/Documents/GitHub/movie-api/express/node_modules/express/node_modules/raw-body/index.js:280:7)
    at IncomingMessage.emit (node:events:519:28)
    at endReadableNT (node:internal/streams/readable:1696:12)
node.js mongoDB npm-install

评论

2赞 puelo 11/16/2023
这个问题在目前的状态下不太可能得到回答。请阅读 stackoverflow.com/help/how-to-ask 并发布受影响的代码段以及可能重现该问题的方法。

答: 暂无答案