Skip to content

@wp-playground/storage imports crc-32 without declaring it #3711

@tbradsha

Description

@tbradsha

Prerequisites

  • I have carried out troubleshooting steps and I believe I have found a bug.
  • I have searched for similar bugs in both open and closed issues and cannot find a duplicate.

Describe the bug

If one imports @wp-playground/storage via pnpm, it fails.

I believe you'd want to add crc-32 to dependencies in @wp-playground/storage/package.json to fix this.

It'd probably be worth checking other packages to ensure no similar problems.

Expected behavior

One should be able to import @wp-playground/storage with no error using pnpm.

Actual behavior

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'crc-32' imported from /Users/some_user/Library/pnpm/store/v10/links/@wp-playground/storage/3.1.35/e733024a20d0607b958cf19323accb72bcdf54a8706f74ccbbba9d5a518cbbc5/node_modules/@wp-playground/storage/index.js

Steps to reproduce

npm 11.9.0:

npm install @wp-playground/storage@3.1.35
node --input-type=module -e 'await import("@wp-playground/storage")' # succeeds

pnpm 10.30.3:

pnpm add @wp-playground/storage@3.1.35
node --input-type=module -e 'await import("@wp-playground/storage")' # fails

Or:

npx @wp-playground/cli # succeeds
pnpm dlx @wp-playground/cli # fails

Isolating the problem

  • I have deactivated other plugins and confirmed this bug occurs when only this plugin is active.
  • This bug happens with a default WordPress theme active.
  • I can reproduce this bug consistently using the steps above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions