question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Windows: EPERM: operation not permitted, symlink

See original GitHub issue

Hi all. On our project, we are using the AWS Lambda function written for Node.js 8.10 target platform. And our Teamcity server is running on Windows AMI. That is why we are using the post-install hook to change the windows bin of Sharp lib to the Linux one with such cmd:

rd /s /q "node_modules\sharp"
npm install --arch=x64 --platform=linux --target=8.10.0 sharp

Now I’m trying to migrate to the Node.js 10.x and the cmd: npm install --arch=x64 --platform=linux --target=10.15.0 sharp gives me something that I cant understood correctly:

ERR! sharp EPERM: operation not permitted, symlink 'libpng16\pngconf.h' -> '...\node_modules\sharp\vendor\include\pngconf.h'

gyp ERR! configure error
gyp ERR! stack Error: Command failed: ...\AppData\Local\Programs\Python\Python36-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax

As I understood, it tries to load the ‘libvips’ and build the bin on my local Windows PC using Python for Linux one?

Does it the correct way to install Sharp lib and how it would be on Teamcity. Or there is another correct way to do this migration?

I do not know much about NodeJS and all this stuff. Thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
lovellcommented, Nov 15, 2019

The message EPERM: operation not permitted, symlink suggests there’s a filesystem or user permission problem involving the creation of symlinks during installation. Please ensure you’re using a filesystem that supports these and a user with permissions to do so.

0reactions
myagizmaktavcommented, Dec 17, 2022

npm run d -package=@types/node

“scripts”: { “d”:" npm i $package --no-bin-links && npm run postinstall", “test”: “echo "Error: no test specified" && exit 1”, “postinstall”: “find node_modules/ -type l -exec rm {} +” },

Read more comments on GitHub >

github_iconTop Results From Across the Web

20 - Stack Overflow
npm install Error: EPERM: operation not permitted, symlink '../mkdirp/bin/cmd.js' · github.com/npm/npm/issues/5824 Are you trying to install in ...
Read more >
[Solved]-Error: EPERM: operation not permitted-node.js
This error indicates that gulp cannot edit (or recreate) the file C:\Users\Chef\app\www\css\ionic.app.css. Check why the your user does not have access to ...
Read more >
Solution to npm install "npm ERR! Error: EPERM - webfoobar
Error: EPERM: operation not permitted" error. I was trying to install pngquant imagemin plugin using this command: npm install imagemin-pngquant.
Read more >
Node js symlink failure in windows - Hashnode
... fine but when I tried it out in windows it is throwing an error as Error: EPERM: operation not permitted, symlink Please...
Read more >
rushstack/rushstack - Gitter
... or full update on Windows: Deleting files from D:\git\Website\common\temp\node_modules ERROR: Error: Error: EPERM: operation not permitted, symlink ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found