Skip to content

cross-env: No such file or directory #690

Closed
@zgosalvez

Description

@zgosalvez

Version info

3.17.5 (Both globally and locally)

Platform Information

OS X and Linux

Steps to reproduce

  1. Create a simple rules.json file
  2. Add the following in firebase.json
{
  "database": {
    "rules": "rules.json",
    "predeploy": "npm --prefix database install && npm --prefix database run build"
  }
}
  1. npm install firebase-tools --save-dev
  2. node_modules/.bin/firebase --project project-id deploy --only database --debug

Expected behavior

Successful deployment.

Actual behavior

[2018-03-08T09:21:55.755Z] ----------------------------------------------------------------------
[2018-03-08T09:21:55.760Z] Command:       /usr/local/bin/node /Users/user/project/node_modules/.bin/firebase --project project-id deploy --only database --debug
[2018-03-08T09:21:55.762Z] CLI Version:   3.17.5
[2018-03-08T09:21:55.762Z] Platform:      darwin
[2018-03-08T09:21:55.762Z] Node Version:  v6.11.5
[2018-03-08T09:21:55.763Z] Time:          Thu Mar 08 2018 17:21:55 GMT+0800 (+08)
[2018-03-08T09:21:55.763Z] ----------------------------------------------------------------------

[2018-03-08T09:21:55.801Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2018-03-08T09:21:55.803Z] > authorizing via signed-in user
[2018-03-08T09:21:55.808Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/project-id

 Thu Mar 08 2018 17:21:55 GMT+0800 (+08)
[2018-03-08T09:21:57.366Z] <<< HTTP RESPONSE 200 server=nginx, date=Thu, 08 Mar 2018 09:21:57 GMT, content-type=application/json; charset=utf-8, content-length=117, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store
[2018-03-08T09:21:57.369Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/project-id/tokens

 Thu Mar 08 2018 17:21:57 GMT+0800 (+08)
[2018-03-08T09:21:58.170Z] <<< HTTP RESPONSE 200 server=nginx, date=Thu, 08 Mar 2018 09:21:58 GMT, content-type=application/json; charset=utf-8, content-length=263, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store

=== Deploying to 'project-id'...

i  deploying database
Running command: /Users/user/project/node_modules/firebase-tools/node_modules/.bin/cross-env npm --prefix database install && npm --prefix database run build
/bin/sh: /Users/user/project/node_modules/firebase-tools/node_modules/.bin/cross-env: No such file ordirectory

Error: database predeploy error: Command terminated with non-zero exit code127

Having trouble? Try firebase deploy --help

N.B.

  1. This only occurs if firebase-tools is not found in the global scope, i.e. npm install -g firebase-tools.
  2. This does not occur on version 3.17.4.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions