Skip to content

Cannot find module 'playwright-core' #9

@BusDriver01

Description

@BusDriver01

Thank 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions