Function Store
  • Home
  • Getting started
    • Introduction
    • Installing a function
    • Reconfiguring a function
    • Uninstalling a function
    • FAQs
  • Reference
    • Requirements
      • Assign Roles
        • User permissions
      • Link a Billing account to your project
      • Enable the APIs
    • Projects
      • How to add a project
      • How to set up a project
    • Functions
      • Benefits
      • Use cases
      • Authentication when installing
      • Runtime configuration
      • Deploying with a ZIP file
    • Policies
      • How to add a Policy
      • How to remove a Policy
    • Authentication
      • Users
      • Roles
      • Permissions
    • Secrets
      • Creating a Secret
      • Using a Secret
      • Changing the value for a Secret
      • Deactivating a Secret
  • developers
    • Overview
    • Getting Started
    • Set up
    • Workspaces
      • Create a workspace
      • Workspace boilerplate
      • Node engines
    • Writing Functions
      • Function Anatomy
      • Configuration file
      • Function Triggers
      • Environment Variables
        • Type "text"
        • Type "number"
        • Type "email"
        • Type "url"
        • Type "json"
        • Type "boolean"
        • Type "select"
        • Type "multiselect"
        • Type "firestoreDocumentPath"
        • Type "firestoreCollectionPath"
        • Type "color"
      • Documentation
    • Push/Update your functions in the cloud
    • Continuous Integration
    • Publish functions in the Marketplace
    • Emulators
      • Initialize emulators in your workspace
      • Environment variables
      • Starting emulators
      • Testing your functions in the emulator
      • Importing existing data into local emulators
        • Exporting data from Cloud Firestore to local emulator
        • Exporting user accounts from Firebase to local emulator
    • Visual Studio Code Extension
      • Installing the extension
      • Extension UI
      • Functions list
      • Creating and editing functions
      • Emulators
      • Extension settings
      • Troubleshooting
        • "Command not found" error when executing a command
  • Billing
    • Understanding Billing
  • Security
    • Security
  • Resources
    • Events and Triggers
    • Best Practices
      • How to log events in functions?
    • Document your Functions
    • Editorial guidelines
    • Our Processes
      • Use Cases Analysis
  • Use cases
    • Custom Stripe Checkout
Powered by GitBook
On this page

Was this helpful?

  1. developers
  2. Visual Studio Code Extension
  3. Troubleshooting

"Command not found" error when executing a command

PreviousTroubleshootingNextUnderstanding Billing

Last updated 3 years ago

Was this helpful?

This is the most common error and it may have several causes. In order to detect the cause and solve the issue, follow these steps:

1.- Check where the binaries for node are installed:

# which node
/usr/local/bin/node

If node is not installed in /usr/local/bin or /usr/bin then you must change VS Code Settings in order to use an external shell instead of the integrated terminal that is the default:

  • Go to VS Code Settings -> Features -> Terminal and switch from Integrated to External

Screenshot

2.- Check that yarn or fstore commands are installed globally on your system (/usr/local/bin or /usr/local/bin in Linux and Mac):

# which yarn
/usr/local/bin/yarn

# which fstore
/usr/local/bin/fstore

If node is not installed in /usr/local/bin or /usr/bin then you must change VS Code Settings in order to use an external shell instead of the default integrated terminal:

  • Go to VS Code Settings -> Extensions -> FStore and change paths to yarn and/or fstore bin

3.- Check your shell default environment config:

In Mac OS and Linux systems, there are several shells available to be used and make more comfortable our work. However, VS Code has some issues capturing value for PATH for some shell environments like zsh, fish. In order to allow VS Code to get the right environment, you must set the variables in the shell default config file for the environment.

In the case of zsh you must set PATH in the file .zshenv which should be located in your home folder (create it if doesn't exists). For example, to set VOLTA bin folder in path:

# echo "export VOLTA_HOME=\"\$HOME/.volta\"" >> ~/.zshenv
# echo "export PATH=\"\$VOLTA_HOME/bin:\$PATH\"" >> ~/.zshenv

Screenshot