steilerDev / icloud-photos-sync

One-way sync engine for the iCloud Photos Library into the native file system
https://icps.steiler.dev/
GNU General Public License v3.0
340 stars 9 forks source link

Installation issue - MacOS Sonoma - npm warn deprecated @backtrace-labs@0.0.2 #566

Open ioapan opened 1 week ago

ioapan commented 1 week ago

Describe the issue

During installation on MacOS Sonoma with the current NodeJS version, I am getting the following:

iMac@iMac ~ % sudo npm install -g icloud-photos-sync npm warn deprecated @backtrace-labs/sdk-core@0.0.2: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm warn deprecated @backtrace-labs/node@0.0.2: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

Then, when I run the icloud-photos-sync, I getting the following error:

file:///usr/local/lib/node_modules/icloud-photos-sync/bin/lib/resources/main.js:2 import PackageData from '../../../package.json' assert { type: 'json' }; // eslint-disable-line ^^^^^^

SyntaxError: Unexpected identifier 'assert' at compileSourceTextModule (node:internal/modules/esm/utils:337:16) at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:166:18) at callTranslator (node:internal/modules/esm/loader:436:14) at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:442:30)

How to reproduce the behavior?

No response

Error Code

SyntaxError: Unexpected identifier 'assert'

Relevant log output

I can't find .icloud-photos-sync.log.

These are the error messages that I get:

file:///usr/local/lib/node_modules/icloud-photos-sync/bin/lib/resources/main.js:2
import PackageData from '../../../package.json' assert { type: 'json' }; // eslint-disable-line
                                                ^^^^^^

SyntaxError: Unexpected identifier 'assert'
    at compileSourceTextModule (node:internal/modules/esm/utils:337:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:166:18)
    at callTranslator (node:internal/modules/esm/loader:436:14)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:442:30)

Operating system

macOS Sonoma

Execution environment

Node.js v22.8.0

icloud-photos-sync version

latest

Checklist

steilerDev commented 1 week ago

Seems I need to update the backtrace dependency - thanks for the catch.

On the error: I'm using node 18 - and I think the assert statements are an experimental feature of those. Can you try using node 18 to see if this resolves the issue?

ioapan commented 1 week ago

You're welcome.

I've just ran it with Node 18:

imac@imac ~ % sudo npm install -g icloud-photos-sync Password: npm warn deprecated @backtrace-labs/sdk-core@0.0.2: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm warn deprecated @backtrace-labs/node@0.0.2: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

added 116 packages in 4s

Then i tried to run it but I'm getting this:

zsh: permission denied: icloud-photos-sync