“url.URL is not a constructor” error updating from 1.25.8 to 2.23.0

Im having the same problem in this post. The only difference i see is the ghost-cli version Im using. Im using nvm and both node and ghost-cli are running in the same environment (10.16.0). I updated ghost-cli to 1.11.0 but its not using it. Could this be the issue preventing me from updating to 2.X? I also used Gscan and made sure it passed 100/100

Debug Information:
    OS: Ubuntu, v16.04
    Node Version: v10.16.0
    Ghost-CLI Version: 1.9.9
    Environment: production
    Command: 'ghost update --force --auto-rollback'
Message: url.URL is not a constructor
Suggestion: journalctl -u ghost_my-theme -n 50
Stack: Error: url.URL is not a constructor
    at Server.server.close (/usr/local/share/.config/yarn/global/node_modules/ghost-cli/lib/utils/port-polling.js:38:28)
    at Object.onceWrapper (events.js:286:20)
    at Server.emit (events.js:198:13)
    at emitCloseNT (net.js:1618:8)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Referenced this from the docs for troubleshooting nvm but everything seems correct
My installs:

which ghost -> /home/administrator/.nvm/versions/node/v10.16.0/bin/ghost
npm root -g -> /home/administrator/.nvm/versions/node/v10.16.0/lib/node_modules

After further investigation it looks like my project is trying to use yarn which is running ghost-cli 1.9.9. It looks like yarn and npm are mixed together after trying to update the ghost-cli with both yarn and npm. Its not using the correct node_modules folder the ghost-cli when i run the update command.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.