Error running Max patch after running it in M4L (I think)

Heidi Chan's icon

Hi everyone,

I'm testing a Max Patch that's part of a project to create a throwable object (using a Bluetooth Adafruit) whose various live acceleration/orientation data can be mapped to audio parameters.

Yesterday, I tried to copy and paste the Max patch into a M4L device in Ableton, and the patch worked for the most part. But then I received an updated version of the patch, and tried to run it again in Max first. There's a "script npm install" button in that patch that I have to run when I run the patch for the first time, and in the past there were no problems, but now I receive this error message, which seems to indicate there is something created in these Ableton Live directories that's messed up the patch??

I tried removing preference files for both programs, but that didn't solve the issue. Hope someone here can shed some light. A friend of mine tried running the patch at his place and also got an error.

Thanks in advance!

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted
Error: EPERM: operation not permitted, uv_cwd
at process.cwd (internal/process/main_thread_only.js:42:25)
at process.cwd (/Applications/Ableton Live 10
Suite.app/Contents/App-Resources/Max/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/node_modules/graceful-fs/polyfills.js:10:19)
at Conf.loadPrefix (/Applications/Ableton Live 10
Suite.app/Contents/App-Resources/Max/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/lib/config/load-prefix.js:46:24)
at load_ (/Applications/Ableton Live 10
Suite.app/Contents/App-Resources/Max/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/lib/config/core.js:109:8)
at Conf.<anonymous> (/Applications/Ableton Live 10
Suite.app/Contents/App-Resources/Max/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/lib/config/core.js:96:5)
at Conf.emit (events.js:223:5)
at ConfigChain._resolve (/Applications/Ableton Live 10
Suite.app/Contents/App-Resources/Max/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/node_modules/config-chain/index.js:281:34)
at ConfigChain.add (/Applications/Ableton Live 10
Suite.app/Contents/App-Resources/Max/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/node_modules/config-chain/index.js:259:10)
at Conf.add (/Applications/Ableton Live 10
Suite.app/Contents/App-Resources/Max/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/lib/config/core.js:338:27)
at Conf.<anonymous> (/Applications/Ableton Live 10
Suite.app/Contents/App-Resources/Max/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/lib/config/core.js:314:25)
internal/process/main_thread_only.js:42
cachedCwd = binding.cwd();
^

Error: EPERM: operation not permitted, uv_cwd
at process.cwd (internal/process/main_thread_only.js:42:25)
at process.cwd (/Applications/Ableton Live 10
Suite.app/Contents/App-Resources/Max/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/node_modules/graceful-fs/polyfills.js:10:19)
at process.errorHandler (/Applications/Ableton Live 10
Suite.app/Contents/App-Resources/Max/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/lib/utils/error-handler.js:181:30)
at process.emit (events.js:223:5)
at process._fatalException (internal/process/execution.js:150:25) {
errno: -1,
code: 'EPERM',
syscall: 'uv_cwd'
}

Heidi Chan's icon

Update: I uninstalled Ableton Live, and also uninstalled/reinstalled Max on my computer and tried to run the patch again, and got this instead:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted
Error: EPERM: operation not permitted, uv_cwd
at process.cwd (internal/process/main_thread_only.js:42:25)
at process.cwd (/Applications/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/node_modules/graceful-fs/polyfills.js:10:19)
at Conf.loadPrefix (/Applications/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/lib/config/load-prefix.js:46:24)
at load_ (/Applications/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/lib/config/core.js:109:8)
at Conf.<anonymous> (/Applications/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/lib/config/core.js:96:5)
at Conf.emit (events.js:223:5)
at ConfigChain._resolve (/Applications/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/node_modules/config-chain/index.js:281:34)
at ConfigChain.add (/Applications/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/node_modules/config-chain/index.js:259:10)
at Conf.add (/Applications/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/lib/config/core.js:338:27)
at Conf.<anonymous> (/Applications/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/lib/config/core.js:314:25)
internal/process/main_thread_only.js:42
cachedCwd = binding.cwd();
^

Error: EPERM: operation not permitted, uv_cwd
at process.cwd (internal/process/main_thread_only.js:42:25)
at process.cwd (/Applications/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/node_modules/graceful-fs/polyfills.js:10:19)
at process.errorHandler (/Applications/Max.app/Contents/Resources/C74/packages/Node For Max/source/bin/npm/lib/utils/error-handler.js:181:30)
at process.emit (events.js:223:5)
at process._fatalException (internal/process/execution.js:150:25) {
errno: -1,
code: 'EPERM',
syscall: 'uv_cwd'
}