如何安装带有nextjs,节点和实体库的实体服务器?

I'm new to nextjs and node-solid-server. I have a simple application with node and nextjs. In my api/solid rout of my application, I'm trying to add a solid server as a middleware like this:

const Ldnode = require('ldnode')
const Solid = require('solid-server')
import initMiddleware from '../../lib/init-middleware'

// Initialize the cors middleware
const solid = initMiddleware(
  Solid()

)

export default async function handler(req, res) {
  // Run solid
  await solid(req, res)

  // Rest of the API logic
  res.json({ message: 'Hello Everyone!' })
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>
export default function initMiddleware(middleware) {
  return (req, res) =>
    new Promise((resolve, reject) => {
      middleware(req, res, (result) => {
        if (result instanceof Error) {
          return reject(result)
        }
        return resolve(result)
      })
    })
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>
http:// localhost:3000 / api / solid 在此处输入图片说明 GET http:// localhost:3000 / api / solid 401(未经身份验证) GET http:// localhost:3000 / common / css / bootstrap.min.css net :: ERR_ABORTED 404(未找到)

我错过了什么?