google / clasp

🔗 Command Line Apps Script Projects
https://developers.google.com/apps-script/guides/clasp
Apache License 2.0
4.59k stars 428 forks source link

Cannot read property 'expiry_date' of undefined - v2.3.0 #814

Open shunexe opened 3 years ago

shunexe commented 3 years ago

Hi,there. I tried to run the following code on Github Actions. However, it always fails at "push"job. And I got this error though I have this property "expiry_date" in my .clasprc.json . I tried to do the same thing on CircleCI with a different code but I failed and got the same error. Does anyone know the solution to this problem?

↓Error Cannot read property 'expiry_date' of undefined image

env:
  CLASPRC: ${{ secrets.CLASPRC }}
  CLASP: ${{secrets.CLASP}}
on:
  push:
    branches:
      - master
jobs:
  deploy:
    name: Deploy
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-node@v1
      with:
        node-version: 12.13.0
    - name: clasp install
      run: sudo npm i @google/clasp -g
    - name: genarate .clasprc.json
      run: echo ${CLASPRC} > ~/.clasprc.json
    - name: generate .clasp.json
      run: echo ${CLASP} > ~/.clasp.json
    - name: push
      run: |
        cd src
        clasp push --force
    - name: deploy
      run: clasp deploy
shunexe commented 3 years ago

This code is for CircleCI. I got the same error,though

version: 2

references:
  container_config: &container_config
    docker:
      - image: circleci/node:12-buster
    working_directory: /home/circleci/project

jobs:
  build_deploy:
    <<: *container_config
    steps:
      - checkout
      - run:
          name: Show system information.
          command: |
            echo "Node $(node -v)"
            echo "Npm $(npm -v)"
      - run:
          name: Set up to gas clasp environment.
          command: sudo npm i @google/clasp -g
      - run:
          name: Deploy to GAS.
          command: |
            echo $CLASPRC_JSON > ~/.clasprc.json
            clasp push
workflows:
  version: 2
  build_deploy_workflow:
    jobs:
      - build_deploy
PopGoesTheWza commented 3 years ago

I have no clue... :/

PopGoesTheWza commented 3 years ago

@ironkicka Just to be sure the issue still exist, can you try replacing @google/clasp 2.3.0 with forked-clasp which is more advanced?

npm uninstall -g @google/clasp
npm install -g forked-clasp