【发布时间】:2021-09-15 12:24:56
【问题描述】:
我的 Node.js API 服务托管在标准环境中运行的谷歌云 App Engine 上。 我已按照所有步骤操作,但调试代理会抛出以下消息:
@google-cloud/debug-agent 重新注册调试对象 xxx-backend 失败:错误:{ 处的文件不存在,或者不是文件。 ENOENT: 没有这样的文件或目录,lstat '/workspace/{'
我的 app.ts 文件顶部有这段代码: require('@google-cloud/debug-agent').start();
我的 Node.js 版本是:14.17.0
更新软件包并再次安装后,错误是:
Error: The file at { does not exist, or it is not a file. ENOENT: no such file or directory, lstat '/workspace/{' at Object.realpathSync (fs.js:1796:7) at GoogleAuth._getApplicationCredentialsFromFilePath (/workspace/node_modules/google-auth-library/build/src/auth/googleauth.js:263:27) at GoogleAuth._tryGetApplicationCredentialsFromEnvironmentVariable (/workspace/node_modules/google-auth-library/build/src/auth/googleauth.js:206:25) at GoogleAuth.getApplicationDefaultAsync (/workspace/node_modules/google-auth-library/build/src/auth/googleauth.js:136:24) at GoogleAuth.getClient (/workspace/node_modules/google-auth-library/build/src/auth/googleauth.js:551:28) at GrpcClient._getCredentials (/workspace/node_modules/@google-cloud/logging/node_modules/google-gax/build/src/grpc.js:145:40) at GrpcClient.createStub (/workspace/node_modules/@google-cloud/logging/node_modules/google-gax/build/src/grpc.js:308:34) at processTicksAndRejections (internal/process/task_queues.js:95:5)
【问题讨论】:
-
该消息通常表示该软件包未安装。确认您已安装它并显示在您的 package.json 中
-
@NoCommandLine 感谢您的回复!它已经存在但我再次安装它现在错误更清楚但仍然不知道如何修复它。我已经更新了帖子上的错误信息。
标签: node.js google-app-engine google-cloud-platform google-appengine-node google-cloud-debugger