Search code examples
node.jsvue.jsdeploymentnuxt.js

Failed redeploy on render.com, Nuxt Fatal Error


The update pushed to Github just fine but the hosting seems to be failing the redeploy and I have no understanding as to why. I already tried to run npm rebuild as suggested by the error message but no luck

One thing that looks kind of odd is its detecting node version 14.17.0 but this project's codebase is in v10, the previous successful reply is in v10 when I run node -v in the local project directory it says it's still v10 so I'm not sure where the confusion is. The Repos package.json also indicates v10.

I'm also aware of the missing firebase dependencies but that has been consistent through all previous re-deploys including the successful ones.

Any guidance in solving this is greatly appreciated!

Log is given when attempting to deploy (deployment through render.com)

Jun 7 01:16:02 PM  ==> Checking out commit 8eaca7e15d53c95fda380c8805aef7eed400cd0d in branch master
Jun 7 01:16:15 PM  ==> Downloading cache...
Jun 7 01:16:31 PM  ==> Downloaded 223MB in 5s. Extraction took 9s.
Jun 7 01:16:33 PM  ==> Detected Node version 14.17.0
Jun 7 01:16:33 PM  ==> Running build command 'yarn install && yarn run post_easy_build'...
Jun 7 01:16:33 PM  yarn install v1.22.5
Jun 7 01:16:33 PM  warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
Jun 7 01:16:33 PM  [1/5] Validating package.json...
Jun 7 01:16:33 PM  [2/5] Resolving packages...
Jun 7 01:16:34 PM  warning Resolution field "[email protected]" is incompatible with requested version "core-js-compat@^3.6.2"
Jun 7 01:16:34 PM  [3/5] Fetching packages...
Jun 7 01:16:35 PM  info [email protected]: The platform "linux" is incompatible with this module.
Jun 7 01:16:35 PM  info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
Jun 7 01:16:35 PM  info [email protected]: The platform "linux" is incompatible with this module.
Jun 7 01:16:35 PM  info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
Jun 7 01:16:35 PM  [4/5] Linking dependencies...
Jun 7 01:16:35 PM  warning " > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
Jun 7 01:16:35 PM  warning " > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
Jun 7 01:16:35 PM  warning "@firebase/firestore > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
Jun 7 01:16:35 PM  warning "firebase > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
Jun 7 01:16:35 PM  warning "firebase > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
Jun 7 01:16:35 PM  warning "firebase > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
Jun 7 01:16:35 PM  warning "firebase > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
Jun 7 01:16:35 PM  warning "firebase > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
Jun 7 01:16:35 PM  warning "firebase > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
Jun 7 01:16:35 PM  warning "firebase > @firebase/auth > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
Jun 7 01:16:35 PM  warning "firebase > @firebase/auth > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
Jun 7 01:16:35 PM  warning "firebase > @firebase/database > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
Jun 7 01:16:35 PM  warning "firebase > @firebase/firestore > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
Jun 7 01:16:35 PM  warning "firebase > @firebase/functions > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
Jun 7 01:16:35 PM  warning "firebase > @firebase/performance > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
Jun 7 01:16:35 PM  warning "firebase > @firebase/storage > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
Jun 7 01:16:35 PM  warning "firebase > @firebase/storage > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
Jun 7 01:16:35 PM  warning "firebase > @firebase/performance > @firebase/installations > @firebase/[email protected]" has unmet peer dependency "@firebase/[email protected]".
Jun 7 01:16:35 PM  warning " > [email protected]" has unmet peer dependency "css-loader@*".
Jun 7 01:16:35 PM  warning " > [email protected]" has unmet peer dependency "webpack@^3.0.0 || ^4.1.0 || ^5.0.0-0".
Jun 7 01:16:35 PM  warning " > [email protected]" has unmet peer dependency "vue@>=2".
Jun 7 01:16:35 PM  warning " > [email protected]" has unmet peer dependency "vue@^2.6.10".
Jun 7 01:16:35 PM  warning " > [email protected]" has unmet peer dependency "webpack@>=2.0.0 <5.0.0".
Jun 7 01:16:35 PM  warning " > [email protected]" has incorrect peer dependency "eslint@^3.18.0 || ^4.0.0".
Jun 7 01:16:35 PM  warning " > [email protected]" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0".
Jun 7 01:16:41 PM  [5/5] Building fresh packages...
Jun 7 01:16:41 PM  success Saved lockfile.
Jun 7 01:16:41 PM  Done in 8.07s.
Jun 7 01:16:41 PM  yarn run v1.22.5
Jun 7 01:16:41 PM  $ yarn run easy:build
Jun 7 01:16:42 PM  $ nuxt build --config-file src/easymediakit/nuxt.config.js
Jun 7 01:16:43 PM  
Jun 7 01:16:43 PM   FATAL  Failed to load gRPC binary module because it was not installed for the current system
Jun 7 01:16:43 PM  Expected directory: node-v83-linux-x64-glibc
Jun 7 01:16:43 PM  Found: [node-v64-linux-x64-glibc]
Jun 7 01:16:43 PM  This problem can often be fixed by running "npm rebuild" on the current system
Jun 7 01:16:43 PM  Original error: Cannot find module '/opt/render/project/src/node_modules/firebase/node_modules/grpc/src/node/extension_binary/node-v83-linux-x64-glibc/grpc_node.node'
Jun 7 01:16:43 PM  Require stack:
Jun 7 01:16:43 PM  - /opt/render/project/src/node_modules/firebase/node_modules/grpc/src/grpc_extension.js
Jun 7 01:16:43 PM  - /opt/render/project/src/node_modules/firebase/node_modules/grpc/src/client_interceptors.js
Jun 7 01:16:43 PM  - /opt/render/project/src/node_modules/firebase/node_modules/grpc/src/client.js
Jun 7 01:16:43 PM  - /opt/render/project/src/node_modules/firebase/node_modules/grpc/index.js
Jun 7 01:16:43 PM  - /opt/render/project/src/node_modules/firebase/node_modules/@firebase/firestore/dist/index.node.cjs.js
Jun 7 01:16:43 PM  - /opt/render/project/src/node_modules/firebase/firestore/dist/index.cjs.js
Jun 7 01:16:43 PM  - /opt/render/project/src/src/easymediakit/plugins/firebase.js
Jun 7 01:16:43 PM  - /opt/render/project/src/src/app/store/api.js
Jun 7 01:16:43 PM  - /opt/render/project/src/src/easymediakit/nuxt.config.js
Jun 7 01:16:43 PM  - /opt/render/project/src/node_modules/@nuxt/config/dist/config.js
Jun 7 01:16:43 PM  - /opt/render/project/src/node_modules/@nuxt/cli/dist/cli-index.js
Jun 7 01:16:43 PM  - /opt/render/project/src/node_modules/@nuxt/cli/dist/cli.js
Jun 7 01:16:43 PM  - /opt/render/project/src/node_modules/nuxt/bin/nuxt.js
Jun 7 01:16:43 PM  
Jun 7 01:16:43 PM    Error: Failed to load gRPC binary module because it was not installed for the current system
Jun 7 01:16:43 PM    Expected directory: node-v83-linux-x64-glibc
Jun 7 01:16:43 PM    Found: [node-v64-linux-x64-glibc]
Jun 7 01:16:43 PM    This problem can often be fixed by running "npm rebuild" on the current system
Jun 7 01:16:43 PM    Original error: Cannot find module 'node_modules/firebase/node_modules/grpc/src/node/extension_binary/node-v83-linux-x64-glibc/grpc_node.node'
Jun 7 01:16:43 PM    Require stack:
Jun 7 01:16:43 PM    - node_modules/firebase/node_modules/grpc/src/grpc_extension.js
Jun 7 01:16:43 PM    - node_modules/firebase/node_modules/grpc/src/client_interceptors.js
Jun 7 01:16:43 PM    - node_modules/firebase/node_modules/grpc/src/client.js
Jun 7 01:16:43 PM    - node_modules/firebase/node_modules/grpc/index.js
Jun 7 01:16:43 PM    - node_modules/firebase/node_modules/@firebase/firestore/dist/index.node.cjs.js
Jun 7 01:16:43 PM    - node_modules/firebase/firestore/dist/index.cjs.js
Jun 7 01:16:43 PM    - src/easymediakit/plugins/firebase.js
Jun 7 01:16:43 PM    - src/app/store/api.js
Jun 7 01:16:43 PM    - src/easymediakit/nuxt.config.js
Jun 7 01:16:43 PM    - node_modules/@nuxt/config/dist/config.js
Jun 7 01:16:43 PM    - node_modules/@nuxt/cli/dist/cli-index.js
Jun 7 01:16:43 PM    - node_modules/@nuxt/cli/dist/cli.js
Jun 7 01:16:43 PM    - node_modules/nuxt/bin/nuxt.js
Jun 7 01:16:43 PM    at Object.<anonymous> (node_modules/firebase/node_modules/grpc/src/grpc_extension.js:53:17)
Jun 7 01:16:43 PM    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
Jun 7 01:16:43 PM    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
Jun 7 01:16:43 PM  
Jun 7 01:16:43 PM  
Jun 7 01:16:43 PM     ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
Jun 7 01:16:43 PM     │                                                                                                                                         │
Jun 7 01:16:43 PM     │   ✖ Nuxt Fatal Error                                                                                                                    │
Jun 7 01:16:43 PM     │                                                                                                                                         │
Jun 7 01:16:43 PM     │   Error: Failed to load gRPC binary module because it was not installed for the                                                         │
Jun 7 01:16:43 PM     │   current system                                                                                                                        │
Jun 7 01:16:43 PM     │   Expected directory: node-v83-linux-x64-glibc                                                                                          │
Jun 7 01:16:43 PM     │   Found: [node-v64-linux-x64-glibc]                                                                                                     │
Jun 7 01:16:43 PM     │   This problem can often be fixed by running "npm rebuild" on the current system                                                        │
Jun 7 01:16:43 PM     │   Original error: Cannot find module                                                                                                    │
Jun 7 01:16:43 PM     │   '/opt/render/project/src/node_modules/firebase/node_modules/grpc/src/node/extension_binary/node-v83-linux-x64-glibc/grpc_node.node'   │
Jun 7 01:16:43 PM     │   Require stack:                                                                                                                        │
Jun 7 01:16:43 PM     │   -                                                                                                                                     │
Jun 7 01:16:43 PM     │   /opt/render/project/src/node_modules/firebase/node_modules/grpc/src/grpc_extension.js                                                 │
Jun 7 01:16:43 PM     │   -                                                                                                                                     │
Jun 7 01:16:43 PM     │   /opt/render/project/src/node_modules/firebase/node_modules/grpc/src/client_interceptors.js                                            │
Jun 7 01:16:43 PM     │   - /opt/render/project/src/node_modules/firebase/node_modules/grpc/src/client.js                                                       │
Jun 7 01:16:43 PM     │   - /opt/render/project/src/node_modules/firebase/node_modules/grpc/index.js                                                            │
Jun 7 01:16:43 PM     │   -                                                                                                                                     │
Jun 7 01:16:43 PM     │   /opt/render/project/src/node_modules/firebase/node_modules/@firebase/firestore/dist/index.node.cjs.js                                 │
Jun 7 01:16:43 PM     │   - /opt/render/project/src/node_modules/firebase/firestore/dist/index.cjs.js                                                           │
Jun 7 01:16:43 PM     │   - /opt/render/project/src/src/easymediakit/plugins/firebase.js                                                                        │
Jun 7 01:16:43 PM     │   - /opt/render/project/src/src/app/store/api.js                                                                                        │
Jun 7 01:16:43 PM     │   - /opt/render/project/src/src/easymediakit/nuxt.config.js                                                                             │
Jun 7 01:16:43 PM     │   - /opt/render/project/src/node_modules/@nuxt/config/dist/config.js                                                                    │
Jun 7 01:16:43 PM     │   - /opt/render/project/src/node_modules/@nuxt/cli/dist/cli-index.js                                                                    │
Jun 7 01:16:43 PM     │   - /opt/render/project/src/node_modules/@nuxt/cli/dist/cli.js                                                                          │
Jun 7 01:16:43 PM     │   - /opt/render/project/src/node_modules/nuxt/bin/nuxt.js                                                                               │
Jun 7 01:16:43 PM     │                                                                                                                                         │
Jun 7 01:16:43 PM     ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Jun 7 01:16:43 PM  
Jun 7 01:16:43 PM  error Command failed with exit code 1.
Jun 7 01:16:43 PM  info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Jun 7 01:16:43 PM  error Command failed with exit code 1.
Jun 7 01:16:43 PM  info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Jun 7 01:16:43 PM  ==> Build failed 😞


Solution

  • From this page of render.com, it looks like they are supporting the latest LTS version: https://render.com/docs/node-version

    By default, Render uses the latest LTS version of Node.

    Looking at node's current releases: https://nodejs.org/en/about/releases/

    It looks like Node.js v14 is the way to go here. You could have your project running locally with Node 10 but if your platform uses 12/14, please try to follow those versions.
    As stated in the docs linked above, you can of course set a specific version of Node into .node-version.


    (I do also recommend using package.json's engines)

    "engines": {
      "node": ">=12 <13"
    }
    

    Could you not update your project to work with Node 14? Even Node 12?


    One important thing npm run build is for target: server and npm run generate is for target: static and nothing else. Don't mix them both.
    As for debugging purposes, I do recommend trying to make it run locally at first, then trying to deploy it on render.com
    PS: nvm is useful to install several versions of Node quickly.


    Also, be sure that you made a diff with Git to be sure that this is not breaking because of code changes somewhere.