Skip to content

test:e2e:run fails with lru-cache error #1

Description

@isaacplmann

I've set up the repo so that npm run build works, but when I run npm run validate, it fails on the test:e2e:run step.

Steps to reproduce:

  1. Clone the repo
  2. Copy .env.default to .env
  3. Run npm run setup
  4. Run npm run build
  5. Run npm run validate (Or npm run test:e2e:run)

Error message:

> test:e2e:run
> cross-env CI=true playwright test

[WebServer] 
> start:mocks
> cross-env NODE_ENV=production MOCKS=true tsx .

[WebServer] 🔶 Mock server installed
[WebServer] SyntaxError: The requested module 'lru-cache' does not provide an export named 'default'
[WebServer] /Users/isaac/Documents/code/epic-web-examples/epic-stack-with-keystatic/build/server/assets/server-build-DjeGgzJ1.js:64
import LRU, { LRUCache } from "lru-cache";
       ^

SyntaxError: The requested module 'lru-cache' does not provide an export named 'default'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:131:21)
    at ModuleJob.run (node:internal/modules/esm/module_job:213:5)
    at ModuleLoader.import (node:internal/modules/esm/loader:316:24)
    at getBuild (file:///Users/isaac/Documents/code/epic-web-examples/epic-stack-with-keystatic/server/index.ts:202:4)
    at file:///Users/isaac/Documents/code/epic-web-examples/epic-stack-with-keystatic/server/index.ts:216:34

Error: Process from config.webServer was not able to start. Exit code: 1


ERROR: "test:e2e:run" exited with 1.

Node version: 20.9.0
Npm version: 10.5.0

Let me know if there's something else, you'd need from me to reproduce this. Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions