Repository: next.js
Issue: dd-trace plugin fails to resolve module due to missing `main` entrypoint on `standalone` builds
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```
    Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 20.6.0: Tue Jun 21 20:50:28 PDT 2022; root:xnu-7195.141.32~1/RELEASE_X86_64
    Binaries:
      Node: 16.10.0
      npm: 7.24.0
      Yarn: 1.22.19
      pnpm: N/A
    Relevant packages:
      next: 12.3.1-canary.5
      eslint-config-next: N/A
      react: 17.0.2
      react-dom: 17.0.2

warn  - Latest canary version not detected, detected: "12.3.1-canary.5", newest: "12.3.1".
        Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
        Read more - https://nextjs.org/docs/messages/opening-an-issue
```

### What browser are you using? (if relevant)

N/A

### How are you deploying your application? (if relevant)

next start in Docker

### Describe the Bug

`dd-trace` provides a `next` plugin: https://github.com/DataDog/dd-trace-js/blob/master/docs/API.md#available-plugins

Next is built with `output: "standalone"` and deployed in a Docker container being started with `node server.js`.

Startup succeeds, but attempting to load localhost results in a module error:
```
info  - Loaded env from /app/.env
Listening on port 8080
Error: Cannot find module '/app/node_modules/next/dist/server/next.js'. Please verify that the package.json has a valid"main" entry
    at tryPackage (node:internal/modules/cjs/loader:353:19)
    at Function.Module._findPath (node:internal/modules/cjs/loader:566:18)
    at Module.Hook.Module.require (/app/node_modules/dd-trace/packages/dd-trace/src/ritm.js:109:26)
    at require (node:internal/modules/cjs/helpers:102:18)
    at parseCookie (/app/node_modules/next/dist/server/api-utils/index.js:19:43)
    at NodeNextRequest.get [as cookies] (/app/node_modules/next/dist/server/api-utils/index.js:129:27)
    at NodeNextRequest.get originalRequest [as originalRequest] (/app/node_modules/next/dist/server/base-http/node.js:16:34)
    at NextNodeServer.attachRequestMeta (/app/node_modules/next/dist/server/next-server.js:1299:46)
    at NextNodeServer.handleRequest (/app/node_modules/next/dist/server/base-server.js:132:18)
    at /app/node_modules/next/dist/server/next-server.js:817:20 {
  code: 'MODULE_NOT_FOUND',
  path: '/app/node_modules/next/package.json',
  requestPath: 'next'
}
```

Reason being that nexts `package.json` `main` entry points to a file that is not copied over in `standalone` mode - but the `package.json` itself is so `dd-trace` can't correctly import the package

### Expected Behavior

Expected next page to be served correctly, instrumented with `dd-trace`

### Link to reproduction

https://github.com/lukexor/nextjs-dd-trace-issue

### To Reproduce

* `npm i dd-trace`
* Add a custom document: `pages/_document.tsx` with the default impl from the NextJS example: https://nextjs.org/docs/advanced-features/custom-document
* Add and init `dd-trace` at the top
```typescript
import tracer from "dd-trace";

tracer.init();
```
* Update `next.config.js` to use `output: "standalone"`
* Add a Dockerfile:
```
# https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile

FROM node:16.10.0-alpine
WORKDIR /app

COPY --chown=node:node next.config.js ./
COPY --chown=node:node public ./public/
COPY --chown=node:node .next/standalone/ ./
COPY --chown=node:node .next/static ./.next/static/

RUN apk update && \
  apk upgrade --no-cache && \
  rm -f /var/cache/apk/*.tar.gz

USER node

EXPOSE 8080
ENV PORT 8080

CMD [ "node", "server.js" ]

HEALTHCHECK --interval=15s --timeout=10s \
  CMD curl -f http://localhost:8080/ || exit 1
```
* `npm run build`
* `docker build -f Dockerfile .`
* `docker run -p 80:8080 <image>`
* Open `http://localhost` in your browser
* See the following message:
```
Listening on port 8080
Error: Cannot find module '/app/node_modules/next/dist/server/next.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:353:19)
    at Function.Module._findPath (node:internal/modules/cjs/loader:566:18)
    at Module.Hook.Module.require (/app/node_modules/dd-trace/packages/dd-trace/src/ritm.js:109:26)
    at require (node:internal/modules/cjs/helpers:102:18)
    at parseCookie (/app/node_modules/next/dist/server/api-utils/index.js:19:43)
    at NodeNextRequest.get [as cookies] (/app/node_modules/next/dist/server/api-utils/index.js:129:27)
    at NodeNextRequest.get originalRequest [as originalRequest] (/app/node_modules/next/dist/server/base-http/node.js:16:34)
    at NextNodeServer.attachRequestMeta (/app/node_modules/next/dist/server/next-server.js:1315:46)
    at NextNodeServer.handleRequest (/app/node_modules/next/dist/server/base-server.js:133:18)
    at /app/node_modules/next/dist/server/next-server.js:833:20 {
  code: 'MODULE_NOT_FOUND',
  path: '/app/node_modules/next/package.json',
  requestPath: 'next'
}
```