grzegorznowak / ansible-nvm-node

Ansible role: global nvm node
https://galaxy.ansible.com/grzegorznowak/nvm_node
12 stars 13 forks source link

refusing to convert from file to symlink for /usr/bin/node #7

Closed ramonrails closed 4 years ago

ramonrails commented 4 years ago

ubuntu 20.04

Problem:

TASK [grzegorznowak.nvm_node : Make the node binary always discoverable by symlinking to a system bin PATH that cron sees by default too] ***************************
fatal: [cpio]: FAILED! => {"changed": false, "gid": 0, "group": "root", "mode": "0755", "msg": "refusing to convert from file to symlink for /usr/bin/node", "owner": "root", "path": "/usr/bin/node", "size": 14416, "state": "file", "uid": 0}

Workaround, I did:

mv /usr/bin/node /usr/bin/system-node

What is a proper solution?

grzegorznowak commented 4 years ago

Given the error, that can't be a vanilla system, you must have had node/nvm there before. In which case just make sure there is no leftover or use a blank-slate container/vm.

ramonrails commented 4 years ago

It is a standard Ubuntu 20.04 server installation. I think it has node pre-installed.

grzegorznowak commented 4 years ago

I would be surprised if Focal had node pre-instaled TBH. But well what do I know.

What I can confirm however is it has to NOT have any node prior to function correctly.

Our CI scenarios are using ubuntu and debian images for integrations and all of those pass suites using blank-slate servers.

So yeah as a quick bodge your solution should probably work short term, but I'd suggest removing all node stuff using dpkg/apt for completeness.

hardyoyo commented 3 years ago

I'm seeing this error, plain vanilla Amazon Linux image, node is definitely not installed, espcecially not at /usr/bin/node.

grzegorznowak commented 3 years ago

@hardyoyo , since this ticket is closed and specific to a different platform I suggest opening a new one and attaching a detailed report of Ansible logs, your system exact version and configuration or anything that might be of use. If there's someone that is willing to work on that, they hopefully will.

Amazon linux is not what we work with nor plan pursuing atm. This role was built and tested against limited set of distributions and Amazon's isn't one of those I'm afraid.

However if you want this pursued by me personally I encourage you to visit my sponsors page https://github.com/sponsors/grzegorznowak?frequency=one-time&sponsor=grzegorznowak

or just contact me directly via email, and we can arrange something.