🔥 Just Launched! Werra Premium Template for HyväSee it in Action

Solved: “Uncaught Error: Call to a member function getPackage()” [Magento 2.3.0]

By Sanjay JethvaUpdated on May 22, 2025 2 min read

Magento 2.3.0 was released on November 28, 2018. Owing to the excellent features it offered, the Magento 2 store owners were bound to upgrade their store to the latest version!

However, some of them faced a theme error “Uncaught Error: Call to a member function getPackage()” in Magento 2.3. 0 while static content deployment. If you are one of them, you may have seen an error like this when you run the command:

php bin/magento setup:static-content:deploy -f

Static content deployment error in Magento 2.3.0

If that’s the case, continue reading for the solution!

Methods to solve “Uncaught Error: Call to a member function getPackage()” in Magento 2.3.0:

Method 1:

Run the below command

rm -rf pub/static/* var/view_preprocessed/pub/*
php bin/magento setup:static-content:deploy -f

Method 2:

email.css and email-inline.css are available in  your custom theme

Open that css file and replace the code:

@import url("{{base_url_path}}frontend/Magento/luma/{{locale}}/css/email-fonts.css"); 

with,

@import url("{{baseUrl}}/css/email-fonts.css");

Run the below command:

php bin/magento setup:static-content:deploy -f

With any of the above methods, you can solve this theme-related error in Magento 2.3.0

Thank you.

Sanjay Jethva Full Image
Article bySanjay Jethva

Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe. His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.