Installation Issue on macOS - EPERM: operation not permitted, uv_cwd



Installation of JavaScript dependencies via `npm` or `yarn` fails with `EPERM: operation not permitted` if the terminal does not have permission for the folder.
For a better user experience, please go to the integrated documentation viewer to read this article.


Installing the JavaScript dependency of the <yfiles-package>/demos/package.json fails if the terminal does not have access to the folder. It'll throw an exception similar to

Error: EPERM: operation not permitted, uv_cwd
    at Object.resolve (path.js:1084:25)
    at Function.Module._resolveLookupPaths (internal/modules/cjs/loader.js:478:17)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:573:20)
    at Function.Module._load (internal/modules/cjs/loader.js:506:25)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:21
    at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:153:3)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
This can happen more easily with the most recent change of the default shell from bash to zee-shell (zsh) with macOS 10.15 Catalina. Previously, accessing a folder without permission would bring up a popup that explicitly asks for the permission. This is not the case anymore with zsh.


Make sure that the terminal has permission to access the folder. For example, if you extract the yFiles package in ~/Documents/, the 'Documents Folder' should be checked in the Security & Privacy settings:

Document Permissions


Categories this article belongs to:
yFiles for HTML
Applies to:
yFiles for HTML: 2.1, 2.2, 2.3, 2.4, 2.5
Mac - Mac OS X - macOS - catalina - npm - yarn - known issue