cached-prisma icon indicating copy to clipboard operation
cached-prisma copied to clipboard

v1.2.2 causing build errors

Open MrJackdaw opened this issue 1 year ago • 0 comments

Bug Report

Hello again 👋

Description

Our project suddenly throws this error when we build with [email protected]. We're using typescript, and had no issues with 1.2.1. The error is Unexpected token 'export' relating to an export { LruCache } from "./LruCache"; line.

Confirmed that the issue is temporarily resolved by downgrading to 1.2.1.

Minimal Reproduction

Our tsconfig file is below. Build a typescript project (with/without that config) using @1.2.2

{
  "extends": "./node_modules/gts/tsconfig-google.json",
  "compilerOptions": {
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noImplicitAny": false,
    "esModuleInterop": true,
    "resolveJsonModule": true,
    "rootDir": ".",
    "outDir": "build"
  },
  "include": ["src/**/*.ts", "test/**/*.ts"],
  "exclude": ["node_modules", "**/*.spec.ts", "cdk.out"]
}

Stack trace

/MyStuff/my-api/node_modules/cached-prisma/dist/index.js:1
export { LruCache } from "./LruCache";
^^^^^^

SyntaxError: Unexpected token 'export'
    at internalCompileFunction (node:internal/vm:77:18)
    at wrapSafe (node:internal/modules/cjs/loader:1287:20)
    at Module._compile (node:internal/modules/cjs/loader:1339:27)
    at Module._compile (/my-api/node_modules/source-map-support/source-map-support.js:521:25)
    at Module._extensions..js (node:internal/modules/cjs/loader:1434:10)
    at require.extensions..jsx.require.extensions..js (/private/var/folders/_z/...js:114:20)
    at Object.nodeDevHook [as .js] (/MyStuff/my-api/node_modules/ts-node-dev/lib/hook.js:63:13)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1022:12)
    at Module.require (node:internal/modules/cjs/loader:1234:19)

Environment

Node v21.5.0
Typescript ^5.3.3

MrJackdaw avatar Feb 07 '24 12:02 MrJackdaw