nodejs

Error: EPERM: operation not permitted, symlink

Error: EPERM: operation not permitted is a short technical note outlining the basic approach and applicable steps regarding symlinking.

An EPERM error during npm install can occur when npm tries to create an executable link on a filesystem that does not support symbolic links. This note covers a project stored on FAT32 under Linux; other permission errors may have a different cause.

Recognize the failing operation

Error: EPERM: operation not permitted, symlink
'../@babel/parser/bin/babel-parser.js' -> '.../node_modules/.bin/parser'

The symlink operation and node_modules/.bin destination identify the step that failed.

From the project directory, use a per-command option:

npm install --bin-links=false

This skips executable-link creation for that installation. The original workaround is a persistent npm setting:

npm config set bin-links false

Prefer the per-command form when the restriction applies to only one project. A persistent setting can also affect later installations.

Check the result and the limitation

Run the project’s usual build or test command after installation. Skipping links can leave package command-line tools unavailable through node_modules/.bin; a successful install alone does not prove the application builds correctly.

For normal development, move the project to a filesystem that supports symbolic links and reinstall its dependencies with links enabled. Avoid treating every EPERM as this filesystem issue: confirm that the failing operation is a symbolic link first.

See the official npm bin-links documentation for the option’s behavior.