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

UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory #109

Closed
EECOLOR opened this issue Dec 5, 2018 · 0 comments
Closed

Comments

@EECOLOR
Copy link

EECOLOR commented Dec 5, 2018

To reproduce (in an empty directory):

yarn add firebase-admin
yarn add --dev @zeit/ncc

index.js

require('firebase-admin')

Run ncc

node_modules/.bin/ncc build index.js

Result:

Emitting directory ~/tmp/firebase-dependencies/node_modules/@google-cloud/firestore/build/protos as protos
ncc: Module directory "~/tmp/firebase-dependencies/node_modules/hash-stream-validation" attempted to require "fast-crc32c" but could not be resolved, assuming external.
ncc: Module directory "~/tmp/firebase-dependencies/node_modules/bytebuffer/dist" attempted to require "memcpy" but could not be resolved, assuming external.
ncc: Module directory "~/tmp/firebase-dependencies/node_modules/debug/src" attempted to require "supports-color" but could not be resolved, assuming external.
ncc: Module directory "~/tmp/firebase-dependencies/node_modules/https-proxy-agent/node_modules/debug/src" attempted to require "supports-color" but could not be resolved, assuming external.
(node:17208) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '~/tmp/firebase-dependencies/dist/protos/firestore_proto_api.d.ts'
    at Object.openSync (fs.js:436:3)
    at Object.writeFileSync (fs.js:1187:35)
    at module.exports.ncc.then (~/tmp/firebase-dependencies/node_modules/@zeit/ncc/dist/ncc/cli.js:2410:14)
(node:17208) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:17208) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant