使用firebase-admin的问题-找不到依赖项

时间:2018-10-08 23:37:43

标签: firebase vue.js firebase-authentication nuxt.js firebase-admin

我正在通过nuxtjs开发应用程序。我已经安装了用于Node.js的Admin SDK,以在服务器端验证用户的令牌,但是当我在项目中导入firebase-admin时,我会遇到下一个问题。我已经安装了child_process fs net tls模块,但是没有用。

  

警告编译时带有4条警告
  ./node_modules/grpc/src/grpc_extension.js中的20:30:20警告

     

关键依赖项:依赖项的请求是一个表达式

     

警告   ./node_modules/grpc/node_modules/node-pre-gyp/lib/pre-binding.js

     

关键依赖项:依赖项的请求是一个表达式

     

警告   ./node_modules/grpc/node_modules/node-pre-gyp/lib/util/versioning.js

     

关键依赖项:依赖项的请求是一个表达式

     

./ node_modules / hash-stream-validation / index.js中的警告

     

未找到模块:错误:无法解析“ fast-crc32c”   'C:\ Users \ ARSENIO \ Desktop \ Development \ nuxt \ project4 \ node_modules \ hash-stream-   验证”

     

ERROR编译失败,出现38个错误
  20:30:20找不到这些依赖项:

     
      ./node_modules/google-auth-library/build/src/auth/googleauth.js中的
  • child_process,   ./node_modules/grpc/node_modules/detect-libc/lib/detect-libc.js
  •   
  • ./ node_modules/@google-cloud/storage/src/file.js,。/ node_modules/@google-cloud/storage/src/bucket.js和其他34个文件中的fs
  •   
     

要安装它们,可以运行:npm install --save child_process fs

package.json文件为:

    {
      "name": "project4",
      "version": "1.0.0",
      "description": "My gnarly Nuxt.js project",
      "author": "Arsenio Aguirre",
      "private": true,
      "scripts": {
        "dev": "nuxt",
        "build": "nuxt build",
        "start": "nuxt start",
        "generate": "nuxt generate",
        "lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
        "precommit": "npm run lint"
     },
    "dependencies": {
      "bootstrap": "^4.1.3",
      "bootstrap-vue": "^2.0.0-beta",
      "chart.js": "^2.7.2",
      "child_process": "^1.0.2",
      "cross-env": "^5.2.0",
      "firebase": "^5.5.3",
     "firebase-admin": "^6.0.0",
     "flag-icon-css": "^2.9.0",
     "font-awesome": "^4.7.0",
     "fs": "0.0.1-security",
     "js-cookie": "^2.2.0",
     "net": "^1.0.2",
     "node-sass": "^4.9.3",
     "nuxt": "^2.0.0",
     "sass-loader": "^6.0.7",
     "simple-line-icons": "^2.4.1",
     "tls": "0.0.1",
     "vue-chartjs": "^3.4.0"
   },
   "devDependencies": {
    "nodemon": "^1.11.0",
    "babel-eslint": "^8.2.1",
    "eslint": "^5.0.1",
    "eslint-loader": "^2.0.0",
    "eslint-plugin-vue": "^4.0.0",
    "eslint-config-prettier": "^3.1.0",
    "eslint-plugin-prettier": "2.6.2",
    "prettier": "1.14.3"
 }

}

0 个答案:

没有答案