Skip to content

Cannot initialize local storage without a --localstorage-file path #1974

@mathhulk

Description

@mathhulk

Describe the bug

Running wxt prepare in CI/CD results in:

playground/extension postinstall$ wxt prepare
playground/extension postinstall: [log] WXT 0.20.11
playground/extension postinstall: [[email protected]] injecting env (0) from .env.production.chrome.local,.env.production.chrome,.env.chrome.local,.env.chrome,.env.production.local,.env.production,.env.local,.env -- tip: ⚙️  enable debug logging with { debug: true }
playground/extension postinstall: [info] Generating types...
playground/extension postinstall: [fail] Command failed after 235 ms
Error: und/extension postinstall: [error] Cannot initialize local storage without a `--localstorage-file` path
playground/extension postinstall:   at Object.get [as localStorage] (node:internal/webstorage:28:17)
playground/extension postinstall:   at get localStorage (node:internal/util:660:20)

Reproduction

I am actually not sure how to reproduce this. For some reason, after running pnpm store prune and reinstalling everything, I cannot reproduce on my local machine. However, it still occurs in CI/CD on GitHub actions.

I do not have any environment variables or files set.

Steps to reproduce

Run wxt prepare in the postinstall script for pnpm in GitHub actions.

System Info

System:
    OS: macOS 26.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 92.14 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.3.0 - /usr/local/bin/node
    npm: 11.5.2 - /usr/local/bin/npm
    pnpm: 10.21.0 - /opt/homebrew/bin/pnpm
    bun: 1.2.13 - /usr/local/bin/bun
    Deno: 2.3.3 - /opt/homebrew/bin/deno
    Watchman: 2025.05.19.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 142.0.7444.135
    Safari: 26.1
  npmPackages:
    rolldown-vite:  7.2.5
    wxt: 0.20.11

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending-triageSomeone (usually a maintainer) needs to look into this to see if it's a bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions