Shopify/slate

Cannot read property 'pop' of undefined

drinkmorewaters opened this issue · 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
             vendors@layout.theme.js   681 KiB       1         vendors@layout.theme
         vendors@layout.theme.js.map  2.36 MiB       1  [dev]  vendors@layout.theme
Entrypoint template.product = vendors@layout.theme.js vendors@layout.theme.js.map layout.theme.styleLiquid.scss.liquid template.product.js template.product.js.map
Entrypoint template.account = vendors@layout.theme.js vendors@layout.theme.js.map layout.theme.styleLiquid.scss.liquid template.account.js template.account.js.map
Entrypoint template.login = vendors@layout.theme.js vendors@layout.theme.js.map layout.theme.styleLiquid.scss.liquid template.login.js template.login.js.map
Entrypoint template.reset_password = vendors@layout.theme.js vendors@layout.theme.js.map 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.

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.

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.

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.

Anybody found a solution to this?