Skip to content
This repository has been archived by the owner on May 15, 2019. It is now read-only.

functions deploy completely ignores --local-path #314

Open
gberliner opened this issue Mar 7, 2019 · 2 comments
Open

functions deploy completely ignores --local-path #314

gberliner opened this issue Mar 7, 2019 · 2 comments

Comments

@gberliner
Copy link

gberliner commented Mar 7, 2019

[zzyzx@localhost firebase-functions-next-example]$ functions --version
1.0.0-beta.5

[zzyzx@localhost firebase-functions-next-example]$ functions deploy nextapp --entry-point app --local-path=./dist/functions/ --trigger-http
ERROR: Function load error: Code could not be loaded.
ERROR: Does the file exists? Is there a syntax error in your code?
ERROR: Detailed stack trace: module.js:471
throw err;
^

Error: Cannot find module '/home/zzyzx/sandbox/firebase-functions-next-example'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at [eval]:1:40
at ContextifyScript.Script.runInThisContext (vm.js:25:33)
at Object.runInThisContext (vm.js:97:38)
at Object. ([eval]-wrapper:6:22)
at Module._compile (module.js:570:32)
at evalScript (bootstrap_node.js:347:27)

ERROR: Error: Failed to deploy function.
at exec (/home/zzyzx/.npm-global/lib/node_modules/@google-cloud/functions-emulator/src/cli/controller.js:126:22)
at ChildProcess.exithandler (child_process.js:205:5)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:920:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)

[zzyzx@localhost firebase-functions-next-example]$ cd dist/functions/

[zzyzx@localhost functions]$ functions deploy nextapp --entry-point app --local-path=./dist/functions/ --trigger-http
Copying file:///tmp/tmp-23743CMIkJcS69x2r.zip...
Waiting for operation to finish...done.
Deploying function..........done.
Function nextapp deployed.
┌─────────────┬──────────────────────────────────────────────────────────────────────────┐
│ Property │ Value │
├─────────────┼──────────────────────────────────────────────────────────────────────────┤
│ Name │ nextapp │
├─────────────┼──────────────────────────────────────────────────────────────────────────┤
│ Entry Point │ app │
├─────────────┼──────────────────────────────────────────────────────────────────────────┤
│ Trigger │ HTTP │
├─────────────┼──────────────────────────────────────────────────────────────────────────┤
│ Resource │ http://localhost:8010/project-id-6454258612623283566/us-central1/nextapp
├─────────────┼──────────────────────────────────────────────────────────────────────────┤
│ Timeout │ 60 seconds │
├─────────────┼──────────────────────────────────────────────────────────────────────────┤
│ Local path │ /home/zzyzx/sandbox/firebase-functions-next-example/dist/functions │
├─────────────┼──────────────────────────────────────────────────────────────────────────┤
│ Archive │ file:///tmp/tmp-23743CMIkJcS69x2r.zip │
└─────────────┴──────────────────────────────────────────────────────────────────────────┘
[zzyzx@localhost functions]$

(notice i even left the bogus --local-path argument in there the second time; it ignored it, and only looked for index.js in current working directory!)

@gberliner gberliner reopened this Mar 7, 2019
@gberliner
Copy link
Author

accidentally closed..

@tsukakei
Copy link

tsukakei commented May 9, 2019

Hi @gberliner , --local-path option doesn't exist anymore.
Instead, we can use --source ( or -S) option!

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

No branches or pull requests

2 participants