firebase函数无法从nuxt3 err_require_esm开始
我正在尝试在本地计算机上的firebase模拟器上运行我的nuxt3应用
错误:解析函数触发器时发生错误。
错误[err_require_esm]:ES模块的require() < my_project_dir> .output \ server \ node_modules \ node-fetch \ src \ index.js 从 < my_project_dir> .output \ server \ node_modules \ firebase-functions \ lib \ lib \ common \ providers \ providers \ identity.js 不支持。而是更改index.js的要求 c:\ users \ Christian \ vscode \ nuxt3-starter.output \ server \ node_modules \ firebase-functions \ lib \ lib \ common \ common \ providers \ providers \ distientity.js 到所有COMPORJS模块中可用的动态import()。
我正在使用以下命令来构建我的应用程序
npx cross-env nitro_preset = firebase npm run构建
我的nuxt3构建版本是v3.0.0-rc.1-27510703.46ecbc5
“ firebase-admin”:“^10.1.0”,“ firebase-functions”:“^3.20.0”, “ firebase-intuntions测试”:“^0.3.3”
I am trying to run my nuxt3 application on the firebase emulator on my local machine, but its, however, failing with the following error
Error: Error occurred while parsing your function triggers.
Error [ERR_REQUIRE_ESM]: require() of ES Module
<my_project_dir>.output\server\node_modules\node-fetch\src\index.js
from
<my_project_dir>.output\server\node_modules\firebase-functions\lib\common\providers\identity.js
not supported. Instead change the require of index.js in
C:\Users\Christian\vscode\nuxt3-starter.output\server\node_modules\firebase-functions\lib\common\providers\identity.js
to a dynamic import() which is available in all CommonJS modules.
I am using the following command to build my application
npx cross-env NITRO_PRESET=firebase npm run build
My nuxt3 build version is v3.0.0-rc.1-27510703.46ecbc5 and my firebase library versions are
"firebase-admin": "^10.1.0", "firebase-functions": "^3.20.0",
"firebase-functions-test": "^0.3.3"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论