Skip to content

Cannot open file app_engine_key.proto after build with esbuild #782

Closed
@giangm9

Description

I was making a Google AppEngine project. I use the google app datastore as the following code

import { Datastore } from "@google-cloud/datastore";

then bundle using https://esbuild.github.io/
After that, an error occurred

  + node --enable-source-maps server.js dev
Error: ENOENT: no such file or directory, open '/home/gl/protos/app_engine_key.proto'
    at Object.openSync (fs.js:476:3)
    at Object.readFileSync (fs.js:377:35)

Environment details

  • OS: Ubuntu 20.0 (wsl)
  • Node.js version: 14
  • npm version: 6.14.10
  • @google-cloud/datastore version: 6.3.1

Steps to reproduce

  1. esbuild src/server/index.tsx --minify --bundle --jsx-factory=h --log-level=error --color=true --sourcemap --platform=node --outfile=server.js
  2. node --enable-source-maps server.js dev

Metadata

Assignees

No one assigned

    Labels

    api: datastoreIssues related to the googleapis/nodejs-datastore API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.web

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions