最新消息: 电脑我帮您提供丰富的电脑知识,编程学习,软件下载,win7系统下载。

Node.js版本和Google Cloud函数

IT培训 admin 11浏览 0评论

Node.js版本和Google Cloud函数

[当我使用firebase serve启动本地Firebase服务器时收到此消息:

警告:您正在使用Node.js v8.9.4,但Google Cloud Functions仅支持v6.11.5。

但是没有关于该怎么做的信息。我需要做什么才能将Node.js降级到v6.11.5?我是否应该仅将该版本用于Firebase项目,并将最新版本的Node.js用于其他项目?在那种情况下我该怎么做?


编辑:警告现在看起来像这样,我无法运行一个新的几乎为空的项目:

Warning: You're using Node.js v8.9.4 but Google Cloud Functions only supports v6.11.5.
!  functions: Failed to load functions source code. Ensure that you have the latest SDK by running npm i --save firebase-functions inside the functions directory.
!  functions: Error from emulator. mod.hasOwnProperty is not a function

因此,我真的认为我不得不放弃Node.js。但是我不知道如何安全地做到这一点。嗯,看着.11.5?


编辑2:如果npm update --dev已解决问题,则仅在新项目中签入。它没。 (实际上没有更新的软件包。)

回答如下:

这只是警告。如果您知道自己在做什么,则可以忽略它。告诉您,对函数的本地仿真(在节点8.9.4上运行)可能与将函数部署到Cloud Functions(运行6.11.5)时的功能完全不匹配。但是,只要您不使用节点6.11.5上不可用的节点功能,就不会有问题。我一直使用较新版本的node进行本地测试,而不会出现问题。

Node.js版本和Google Cloud函数

[当我使用firebase serve启动本地Firebase服务器时收到此消息:

警告:您正在使用Node.js v8.9.4,但Google Cloud Functions仅支持v6.11.5。

但是没有关于该怎么做的信息。我需要做什么才能将Node.js降级到v6.11.5?我是否应该仅将该版本用于Firebase项目,并将最新版本的Node.js用于其他项目?在那种情况下我该怎么做?


编辑:警告现在看起来像这样,我无法运行一个新的几乎为空的项目:

Warning: You're using Node.js v8.9.4 but Google Cloud Functions only supports v6.11.5.
!  functions: Failed to load functions source code. Ensure that you have the latest SDK by running npm i --save firebase-functions inside the functions directory.
!  functions: Error from emulator. mod.hasOwnProperty is not a function

因此,我真的认为我不得不放弃Node.js。但是我不知道如何安全地做到这一点。嗯,看着.11.5?


编辑2:如果npm update --dev已解决问题,则仅在新项目中签入。它没。 (实际上没有更新的软件包。)

回答如下:

这只是警告。如果您知道自己在做什么,则可以忽略它。告诉您,对函数的本地仿真(在节点8.9.4上运行)可能与将函数部署到Cloud Functions(运行6.11.5)时的功能完全不匹配。但是,只要您不使用节点6.11.5上不可用的节点功能,就不会有问题。我一直使用较新版本的node进行本地测试,而不会出现问题。

与本文相关的文章

发布评论

评论列表 (0)

  1. 暂无评论