Codestrips project - error when I install body-parser

I’m following step 4 in the Codestrips cumulative project as stated here:

You should npm install body-parser in the terminal and require the body-parser package in app.js Use its .json() method.

When I do so, I get this in the terminal:

$ npm install body-parser
codestrips@1.0.0 /home/ccuser/workspace/build-apis-mini-capstone-codestrips
└── (empty)

npm WARN codestrips@1.0.0 No description
npm WARN codestrips@1.0.0 No repository field.

I’m not sure what this means. I do know that I should be able to get something showing in the browser, but I don’t. (I’ve already done step 5 to get to that point)

Here is my code to this point:

const express = require('express');
const app = express();
const morgan = require('morgan');  // console logging middleware
const bodyParser = require('body-parser');

app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.json())

app.use(function (req, res) {
  res.setHeader('Content-Type', 'text/plain')
  res.write('you posted:\n')
  res.end(JSON.stringify(req.body, null, 2))
})

app.use(morgan('dev'));
const PORT = process.env.PORT || 4001
app.use(express.static('public'));

app.listen(PORT, ()=>{
  console.log(`listening on PORT ${PORT}`);
});

module.exports = app;

Here is the link to the project:
https://www.codecademy.com/paths/web-development/tracks/building-a-persistent-api/modules/persistent-api-cumulative-projects/projects/codestrips-prj

Any insight would be appreciated. Thanks, Chip

I used your code, started the server with node app.js, and was able to get something back:

Which was the middleware you added here:

app.use(function (req, res) {
  res.setHeader('Content-Type', 'text/plain')
  res.write('you posted:\n')
  res.end(JSON.stringify(req.body, null, 2))
})

That middleware is stopping the others from running, including the one defined here that serves the static front-end files: app.use(express.static('public')); and the middleware that does the logging

If you comment out (or remove) the one you added, restart the server, and then press the ‘Refresh’ button on the embedded browser, it will load the front-end you’re after:

Thank you so much!
The instructions gave a link, as a hint, to an example of boilerplate that I thought would be necessary. Apparently not.
Thanks again!