AWS Lambda:错误:ENOENT:没有这样的文件或目录,mkdir '/var/task/node_modules/@types/nexus-typegen'

Ale*_* V. 6 lambda amazon-web-services node.js enoent

我在 Lambda cloudwatch 日志中收到以下错误

    ERROR   [Error: ENOENT: no such file or directory, mkdir '/var/task/node_modules/@types/nexus-typegen'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'mkdir',
  path: '/var/task/node_modules/@types/nexus-typegen'
}
Run Code Online (Sandbox Code Playgroud)

我尝试修改 webpack 以强制捆绑目录,例如:

 new CopyWebpackPlugin({
          patterns: [
            {from: "./node_modules/@types/nexus-typegen"}
         ]
     })
Run Code Online (Sandbox Code Playgroud)

我还将我的 prisma makeSchema 修改为GenerateArtifacts: false

MakeSchema({
  types: typeDefs,
  plugins: [
    nexusPrisma({ experimentalCRUD: true, shouldGenerateArtifacts: false }),
  ]
Run Code Online (Sandbox Code Playgroud)

但到目前为止没有任何效果...有人有解决方法吗?