title: TypeError [ERR_HTTP_INVALID_HEADER_VALUE]: Invalid value “undefined” for header “x-api-key” error in Nuxt.js CI / CD
body: <p>I am using Nuxt.js in SSR mode and trying to deploy to FirebaseHosting using CircleCI.
  .circleci / config.yml is as follows.</p>
  
  <p>At this time, you are encountering TypeError [ERR_HTTP_INVALID_HEADER_VALUE]: Invalid value "undefined" for header "x-api-key" error in yarn generate while running the job of name: build.</p>
  
  <pre><code>version: 2
  jobs:
    deploy:
      docker:
        - image: circleci/node:12.11.0
      working_directory: ~/repo
      steps:
        - checkout
        - run:
            name: setup credential
            command: echo $CREDENTIAL_ENV | base64 --decode &gt; .env
        - restore_cache:
            keys:
              - v1-dependencies-{{ checksum "package.json" }}
              - v1-dependencies-
        - run: yarn install
        - save_cache:
            paths:
              - node_modules
            key: v1-dependencies-{{ checksum "package.json" }}
        - run:
            name: build
            command: yarn build &amp;&amp; yarn generate
        - run:
            name: deploy to Firebase Hosting
            command: ./node_modules/.bin/firebase deploy --token=$FIREBASE_TOKEN
  
  workflows:
    version: 2
    deploy:
      jobs:
        - deploy
  </code></pre>
  
  <p>Although it is not in config.yml, to create sitemap and feed in nuxt.config.js, we use "x-api-key" in the request header to request and generate api. I know that may be causing the error, but if I run the exact same code on my local PC (mac), it works fine.</p>
  
  <p>It would be nice if you could give me any information, even if I had something to understand.</p>
  
  <p>[environment]<br>
  The version of node is v12.10.0.<br>
  "nuxt": "^2.0.0"</p>