Windows: EPERM: operation not permitted, symlink
See original GitHub issueHi 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:
- Created 4 years ago
- Comments:5 (2 by maintainers)
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.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 {} +” },