Cannot find module 'playwright-core'
See original GitHub issueThank you for this library, I have found playwright to be superior to puppeteer and would prefer to use it on AWS.
Unfortunately currently I am getting an error whenever I try to use it, including the simple demo code in the README.
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'playwright-core'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (E:\Nodejs\AllTheComps\playwright\dev\node_modules\playwright-aws-lambda\dist\src\chromium.js:5:20)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
The offending line is:
const playwright = require("playwright-core");
I’m developing on Windows but this happened on Lambda as well. I have npm install’d playwright-core, it definitely exists in node_modules
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Error: Cannot find module '@playwright/test' - Stack Overflow
In my case, node_modules/@playwright remained empty when installed with Yarn . npm did the job · This seems related to github.com/microsoft/ ...
Read more >playwright-core - npm
A high-level API to automate web browsers. Latest version: 1.29.1, last published: 5 days ago. Start using playwright-core in your project ...
Read more >Cannot find module '@playwright/test' error in Node.js
The error "Cannot find name '@playwright/test'" occurs when we import the @playwright/test module before installing it. To solve the error, ...
Read more >Error: Cannot find module - Running Tests - CircleCI Discuss
Hi, While running test in cirlce CI I am facing this issue. Error: Cannot find module '@pages/CreateCertificatePage' Require stack: ...
Read more >cannot find module 'formik' or its corresponding type ...
To solve the "Cannot find module react or its corresponding type declarations" error, install the module and its type definitions by running the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This error is due to the issue in the core package. In version 1.1.0 the playwright-core package does not contain anymore a valid index.js / entrypoint.
1.0.2: https://unpkg.com/playwright-core@1.0.2/index.js <-- expected 1.1.0: https://unpkg.com/playwright-core@1.1.0/index.js <-- actual
Was going to write that this bug has been reported at
playwrightbut I see you’ve participated in that thread already. Hope we’ll see a fix very soon, the PR has been submitted. Thanks again @austinkelleher and @sanudatta11 !