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

Cannot deploy functions with git dependencies #1301

Closed
billyjs opened this issue May 16, 2019 · 5 comments
Closed

Cannot deploy functions with git dependencies #1301

billyjs opened this issue May 16, 2019 · 5 comments

Comments

@billyjs
Copy link

billyjs commented May 16, 2019

[REQUIRED] Environment info

firebase-tools: v6.9.2

Platform: Windows

[REQUIRED] Test case

"dependencies": {
    "@slack/interactive-messages": "github:ErwinLengkeek/node-slack-interactive-messages#feature/issue-91"
}

[REQUIRED] Steps to reproduce

with git dependencies in functions/package.json run firebase deploy or firebase deploy --only functions

[REQUIRED] Expected behavior

project is deployed successfully

[REQUIRED] Actual behavior

functions[endpoints(us-central1)]: Deployment error.
Function failed on loading user code. Error message: Code in file index.js can't be loaded.
Did you list all required modules in the package.json dependencies?
Detailed stack trace: Error: Cannot find module '@slack/interactive-messages'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/srv/index.js:65:34)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at getUserFunction (/worker/worker.js:439:24)
    at loadUserCode (/worker/worker.js:495:18)
    at /worker/worker.js:720:31
    at Layer.handle [as handle_request] (/worker/node_modules/express/lib/router/layer.js:95:5)
@bkendall
Copy link
Contributor

I am unable to replicate this behavior.

Have you run npm install in your functions directory? When the deployment runs, it has to parse the code in that directory and it will break if you've not run npm install there.

@bkendall
Copy link
Contributor

Oop - I guess my machine changed its mind. Now I can replicate this pretty reliably. I see the error message which is coming all the way from GCF. I think @thechenky will be the best person to help triage this.

@bkendall bkendall assigned thechenky and unassigned bkendall May 17, 2019
@bkendall bkendall removed the Needs: Author Feedback Issues awaiting author feedback label May 17, 2019
@thechenky
Copy link
Contributor

Hi @billyjs your git dependency definition looks off - can you follow the guide here https://docs.npmjs.com/files/package.json#git-urls-as-dependencies? The URL should start with a <protocol>.

@taeold taeold added the Needs: Author Feedback Issues awaiting author feedback label Dec 29, 2022
@google-oss-bot
Copy link
Contributor

Hey @billyjs. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot
Copy link
Contributor

Since there haven't been any recent updates here, I am going to close this issue.

@billyjs if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants