![](/img/trans.png)
[英]Error shows 'cannot find module firebase-functions' when deploying a firebase project
[英]Nuxt FATAL error when initializing '@nuxtjs/firebase' module - Cannot find module 'firebase/compat/app'
我有一个运行在 firebase 函数上的 nuxt ssr 应用程序。 我正在尝试将 firebase 分析添加到我的项目中。 根据教程,我在 package.json 上添加了“@nuxtjs/firebase”模块并安装了所有依赖项。 现在,我在 nuxt.config.js 文件中添加了以下代码。
modules: [
'@nuxtjs/firebase',
],
firebase: {
config: {
apiKey: '<apiKey>',
authDomain: '<authDomain>',
databaseURL: '<databaseURL>',
projectId: '<projectId>',
storageBucket: '<storageBucket>',
messagingSenderId: '<messagingSenderId>',
appId: '<appId>',
measurementId: '<measurementId>'
},
services: {
analytics: true
}
}
当我使用npm run dev运行此代码时,出现以下错误。
WARN Module @nuxtjs/firebase not found. Please ensure @nuxtjs/firebase is in dependencies and installed.
FATAL Cannot find module 'firebase/compat/app'
Require stack:
我无法在任何地方找到任何答案。
您还需要安装基本的 firebase 包。
yarn add firebase
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.