Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] @mendable/firecrawl-js incompatible with firebase functions #885

Open
goodspeed3 opened this issue Nov 11, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@goodspeed3
Copy link

goodspeed3 commented Nov 11, 2024

Describe the Bug
Cannot deploy to firebase functions using this SDK.

To Reproduce
Steps to reproduce the issue:

  1. initiate Firebase function
  2. import @mendable/firecrawl-js and use any firebase function
  3. Deploy firebase function
  4. See error message
i  functions: updating Node.js 20 (1st Gen) function triggers-onUserCreated(us-central1)...
Function failed on loading user code. This is likely due to a bug in the user code. Error message: Provided module can't be loaded.
Did you list all required modules in the package.json dependencies?
Detailed stack trace: Error: Cannot find module 'ws'
Require stack:
- /layers/google.nodejs.yarn/yarn_modules/nfeat: dynamically import WebSocket module with error handlingode_modules/isows/_cjs/index.js
- /layers/google.nodejs.yarn/yarn_modules/node_modules/@mendable/firecrawl-js/dist/index.cjs
- /workspace/main.js
- /layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/loader.js
- /layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/main.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/layers/google.nodejs.yarn/yarn_modules/node_modules/isows/_cjs/index.js:4:20)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
Could not load the function, shutting down.. Please visit https://cloud.google.com/functions/docs/troubleshooting for in-depth troubleshooting documentation.

Expected Behavior
Successful deployment

Environment (please complete the following information):

  • Firecrawl Version: 1.2.7
  • Node.js Version: 20

Additional Context
Once I remove the @mendable library from firebase functions, deploy is successful.

Works fine with Firebase emulators.

@goodspeed3 goodspeed3 added the bug Something isn't working label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants