question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deploy error - Cannot destructure property 'theme' of 'undefined'

See original GitHub issue

Hi,

I’m not able to deploy my theme anymore, as I used to do. I don’t think I changed anything here. I’m using the online version of Ghost.

This is the error I face:

Error [InternalServerError]: Cannot destructure property 'theme' of 'undefined' as it is undefined.
    at /home/runner/work/_actions/TryGhost/action-deploy-theme/v1.4.0/dist/index.js:7300:33
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async main (/home/runner/work/_actions/TryGhost/action-deploy-theme/v1.4.0/dist/index.js:1572:9) {
  name: 'InternalServerError',
  context: null,
  type: 'InternalServerError',
  details: null,
  property: null,
  help: null,
  code: null,
  id: '2b380560-e096-11eb-97cd-e1a27588ea00'
}

This is my config:

name: Deploy Theme
on:
  push:
    branches:
      - master
      - main
jobs:
  deploy:
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@v2
      - name: Deploy Ghost Theme
        uses: TryGhost/action-deploy-theme@v1.4.0
        with:
          api-url: ${{ secrets.GHOST_ADMIN_API_URL }}
          api-key: ${{ secrets.GHOST_ADMIN_API_KEY }}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

1reaction
potskycommented, Jul 9, 2021

Ok, bug is resolved and came from ghost.org…

Our team is aware of an issue related to uploading themes, which we've just released a fix for. Are you able to clear your caches and give it another try? 

Deploys are now running fine again !

1reaction
endk17commented, Jul 9, 2021

@paultalarian @potsky

Fix: in package.json the naming convention needs to be unique. Please see below for the convention that I am now using when deploying.

Commit 1 "name": "casper-new-09072021-01"

Commit 2 "name": "casper-new-09072021-02"

{
    "name": "casper-new-09072021-01",
    "description": "A clean, minimal default theme for the Ghost publishing platform",
    "demo": "https://demo.ghost.io",
    "version": "4.1.2",
    "engines": {
        "ghost": ">=4.0.0",
        "ghost-api": "v4"
    }
}

Hope this helps and makes sense

Read more comments on GitHub >

github_iconTop Results From Across the Web

[error] Cannot destructure property 'nuxt' of 'this' as it is ...
Working fine on dev. When deploying to vercel it fails: [error] Cannot destructure property 'nuxt' of 'this' as it is undefined. Might be ......
Read more >
WebpackError: TypeError: Cannot destructure property
Have you tried rm -rf node_modules and npm install again? If what you have works in gatsby develop but doesn't work with gatsby...
Read more >
Error “Cannot destructure property”
In the actual v 3.0.6 I got an JS-error. Uncaught TypeError: Cannot destructure property '__' of 'wp.i18n' as it is undefined. at ...
Read more >
body": Cannot destructure property 'config' of 'strapi.plugin ...
commnand. It installs the Strapi app fine, but when I try to run “npm run develop”, I get this error: “Strapi: Middleware “ ......
Read more >
Ionic 4 Cannot destructure property `createHash` of 'undefined ...
Can you help me? ... :wave: Hi there! Hmm, not really sure what could be going on here. But the error points to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found