nextcloud / photos

📸 Your memories under your control
GNU Affero General Public License v3.0
571 stars 62 forks source link

Console error on Safari 14 #1960

Open camilasan opened 1 year ago

camilasan commented 1 year ago

Describe the bug When you click on a Album, it does not open.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'apps/photos/albums'
  2. Click on any album
  3. Check the browser console
  4. See error: SyntaxError: Unexpected private name #s. Cannot parse class method with private name. ChunkLoadError: Loading chunk vendor-node_modules_nextcloud_upload_dist_index_esm_js failed. safari-error

Expected behavior When you click on an Album, the page loads with the pictures from the Album.

Desktop (please complete the following information):

Browser log safari-console-error

Additional context This was specifically tested on Nextcloud 25.0.7.

ChristophWurst commented 1 year ago

The error is caused by https://github.com/nextcloud-libraries/nextcloud-upload using a ES language feature that is not present in Safari 14 but later versions. The packages uses https://github.com/nextcloud/babel-config but apparently not https://github.com/nextcloud/browserslist-config / https://github.com/nextcloud/browserslist-config/blob/master/browserlist.config.js. So the compiled ES might just have the wrong targets.

skjnldsv commented 1 year ago

AH, so we should just make sure not t ignore @nextcloud/upload from the transpiling here

skjnldsv commented 1 year ago

https://github.com/nextcloud/photos/blob/00515372dee2c4df3cd0687e5a7c48900ddacf73/webpack.js#L17-L20