Skip to content

Cannot run tests with @preact/playwright-ct V0.1.1 - "TypeError: (0 , test_1._addRunnerPlugin) is not a function" #12

@jernstdoteth

Description

@jernstdoteth

I have been trying to get V0.1.1 to run with no luck, and I am receiving the following error:

TypeError: (0 , _test._addRunnerPlugin) is not a function
    at Object.<anonymous> (/Users/jacksonernst/playwright-ct/src/index.ts:27:17)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Module.f._compile (/Users/jacksonernst/playwright-ct/node_modules/@playwright/test/lib/utilsBundleImpl.js:16:994)
    at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Object.i.<computed>.ot._extensions.<computed> (/Users/jacksonernst/playwright-ct/node_modules/@playwright/test/lib/utilsBundleImpl.js:16:1010)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/jacksonernst/playwright-ct/playwright-ct.config.ts:1:1)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Module.f._compile (/Users/jacksonernst/playwright-ct/node_modules/@playwright/test/lib/utilsBundleImpl.js:16:994)
    at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Object.i.<computed>.ot._extensions.<computed> (/Users/jacksonernst/playwright-ct/node_modules/@playwright/test/lib/utilsBundleImpl.js:16:1010)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at requireOrImport (/Users/jacksonernst/playwright-ct/node_modules/@playwright/test/lib/common/transform.js:163:20)
    at requireOrImportDefaultObject (/Users/jacksonernst/playwright-ct/node_modules/@playwright/test/lib/common/configLoader.js:225:53)
    at ConfigLoader.loadConfigFile (/Users/jacksonernst/playwright-ct/node_modules/@playwright/test/lib/common/configLoader.js:57:26)
    at runTests (/Users/jacksonernst/playwright-ct/node_modules/@playwright/test/lib/cli.js:127:46)
    at ji.<anonymous> (/Users/jacksonernst/playwright-ct/node_modules/@playwright/test/lib/cli.js:45:7)

I've been encountering this error when running my own tests in my project's repo, but the error above was from the tests in this repo. To produce this, I cloned this repo and tried an install with Yarn 1.22.15 (at the V0.1.1 tag). After running the build command, running the test command produced the above error.

Interestingly, installing with pnpm does not result the following error, but I am unable to use pnpm in the project I am working on. Any help would be greatly appreciated!

Edit: Just tried to run the tests in this repo at V0.1.1 after installing with Yarn 3.x and npm, both resulted in the above error. The tests only seem to work when install with pnpm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions