ModuleNotFoundError: No module named 'playwright' during Firebase function deployment
#8121
Labels
ModuleNotFoundError: No module named 'playwright' during Firebase function deployment
#8121
[REQUIRED] Environment info
firebase-tools:
13.29.1
Platform: macOS
[REQUIRED] Test case
A minimal example where
playwright
module is imported in thescraper_with_pw.py
file.[REQUIRED] Steps to reproduce
pip install -r requirements.txt
which includesplaywright
.firebase emulators:start --only functions
.firebase deploy --only functions
.ModuleNotFoundError: No module named 'playwright'
.[REQUIRED] Expected behavior
The
playwright
module should be successfully imported and used in the Firebase function, and the function should execute without errors.[REQUIRED] Actual behavior
When running locally, everything works fine. However, when deploying the Firebase function, it fails with the following error:
Additionally, the function deployment fails with the error:
`Failed to load function definition from source: FirebaseError: Functions codebase could not be analyzed successfully. It may have a syntax or runtime
The text was updated successfully, but these errors were encountered: