slate icon indicating copy to clipboard operation
slate copied to clipboard

Cannot read property 'pop' of undefined

Open drinkmorewaters opened this issue 5 years ago • 4 comments

Running yarn deploy/yarn zip is no longer working for our site, all builds are failing, can't build the theme for deployment now. Getting the message "Cannot read property 'pop' of undefined". Changing a single line our the existing JS file gives the error. Meaning we cannot write any JS for this site without something breaking.

Yesterday it was building fine, today, it's breaking every build.

I have done a yarn upgrade and reinstalled all packages, with no help.

yarn deploy
yarn run v1.19.1
$ slate-tools build && slate-tools deploy
clean-webpack-plugin: /Users/dell/Documents/Development/Dates/16 11 2019/cdnvuenpmtailwind/slate-vue-theme/dist has been removed.
Hash: bfbc6d513a61b9b9cf67
Version: webpack 4.41.5
Time: 20203ms
Built at: 01/12/2020 10:00:40
                               Asset      Size  Chunks         Chunk Names
layout.theme.styleLiquid.scss.liquid   144 KiB       0         layout.theme
                 template.account.js  1.48 KiB       2         template.account
             template.account.js.map  7.93 KiB       2  [dev]  template.account
                   template.login.js  1.48 KiB       3         template.login
               template.login.js.map  7.93 KiB       3  [dev]  template.login
                 template.product.js  1.48 KiB       4         template.product
             template.product.js.map  7.93 KiB       4  [dev]  template.product
          template.reset_password.js  1.48 KiB       5         template.reset_password
      template.reset_password.js.map  7.94 KiB       5  [dev]  template.reset_password
             [email protected]   681 KiB       1         [email protected]
         [email protected]  2.36 MiB       1  [dev]  [email protected]
Entrypoint template.product = [email protected] [email protected] layout.theme.styleLiquid.scss.liquid template.product.js template.product.js.map
Entrypoint template.account = [email protected] [email protected] layout.theme.styleLiquid.scss.liquid template.account.js template.account.js.map
Entrypoint template.login = [email protected] [email protected] layout.theme.styleLiquid.scss.liquid template.login.js template.login.js.map
Entrypoint template.reset_password = [email protected] [email protected] layout.theme.styleLiquid.scss.liquid template.reset_password.js template.reset_password.js.map

ERROR in chunk layout.theme [initial]
layout.theme.css.liquid
Cannot read property 'pop' of undefined
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

The day has finally come where i fear slate and it's wrath.

drinkmorewaters avatar Jan 12 '20 02:01 drinkmorewaters

I was able to bypass this for now, by just not using the webpack/slate chunking. At this point, i really need to find a way to remove slate altogether.

Be nice if Shopify changed "Slate on Low Maintenance" to "Slate on No Maintenance", cause it is.

drinkmorewaters avatar Jan 12 '20 03:01 drinkmorewaters

I think this comes from having too many scripts/{layouts,sections,templates}.js. I remember having this before and it was something to do with a combined chunk name being too big.

dan-gamble avatar Jan 12 '20 14:01 dan-gamble

Script size and amount of scripts didn't change. So not sure that's it, something to do with webpack which is heavily used in Slate, but never maintained, so it's more that.

drinkmorewaters avatar Jan 14 '20 04:01 drinkmorewaters

Anybody found a solution to this?

razvanmitre avatar Apr 02 '21 17:04 razvanmitre