我重新安装了多次NPM和Node在我的电脑。
(npm 版本 7.4.3)
(节点版本 v15.7.0)
我按照以下步骤进行配置Firebase CLI:
npm install -g firebase-tools
Run Code Online (Sandbox Code Playgroud)
和firebase init和firebase deploy和配置似乎工作正常。
当我打开index.js文件并取消注释股票 helloWorld 函数时,我面临的问题发生了,如下所示:
exports.helloWorld = functions.https.onRequest((request, response) => {
functions.logger.info("Hello logs!", {structuredData: true});
response.send("Hello from Firebase!");
});
Run Code Online (Sandbox Code Playgroud)
我运行firebase deploy并收到此错误
functions[helloWorld(us-central1)]: Deployment error.
Build failed: Build error details not available. Please check the logs at https://console. {urlStuff}
Functions deploy had errors with the following functions:
helloWorld
To try redeploying those functions, run: …Run Code Online (Sandbox Code Playgroud)