Skip to content
This repository was archived by the owner on Aug 16, 2023. It is now read-only.
This repository was archived by the owner on Aug 16, 2023. It is now read-only.

Instructed to run firebase deploy from wrong directory #69

@jbthn

Description

@jbthn

I'm following the Level 2 codelab instructions, and when I got to the "Deploy your fulfillment" section of step 3 ("Set up for local development") I got the following error when trying to run firebase deploy:

Error: ENOENT: no such file or directory, stat 'functions/package.json'
    at Object.statSync (fs.js:932:3)
    at Object.fs.statSync (pkg/prelude/bootstrap.js:983:32)
    at Object.load (/Users/<user>/.cache/firebase/tools/lib/node_modules/cjson/index.js:200:12)
    at getRuntimeChoice (/Users/<user>/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/parseRuntimeAndValidateSDK.js:55:26)
    at module.exports (/Users/<user>/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/deploy/functions/prepare.js:26:29)
    at _chain (/Users/<user>/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/deploy/index.js:22:40)
    at /Users/<user>/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/deploy/index.js:63:16
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Since the debug logs made it seem like the deploy command was looking for functions/package.json, I thought the earlier instruction to navigate to /level2/functions before running firebase deploy might be incorrect. When I tried cd .. and re-ran the deploy command, and it worked.

It looks like the documentation should be updated to indicate that firebase deploy should be run from codelabs-nodejs/level2, not from the functions directory.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jbthn

        Issue actions

          Instructed to run `firebase deploy` from wrong directory · Issue #69 · actions-on-google/codelabs-nodejs