tinder-clone icon indicating copy to clipboard operation
tinder-clone copied to clipboard

Step 5/11 : RUN npm i -g yarn - npm ERR! code EEXIST

Open franciscof5 opened this issue 3 years ago • 1 comments

It seems silly and easy to fix (not for me), but for a fresh install should not happen, thanks for the project

Step 5/11 : RUN npm i -g yarn ---> Running in ddf5012cf2e2

[email protected] preinstall /usr/local/lib/node_modules/yarn :; (node ./preinstall.js > /dev/null 2>&1 || true)

npm ERR! code EEXIST npm ERR! syscall symlink npm ERR! path ../lib/node_modules/yarn/bin/yarn.js npm ERR! dest /usr/local/bin/yarnpkg npm ERR! errno -17 npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/yarn/bin/yarn.js' -> '/usr/local/bin/yarnpkg' npm ERR! File exists: /usr/local/bin/yarnpkg npm ERR! Remove the existing file and try again, or run npm npm ERR! with --force to overwrite files recklessly.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-07-31T18_32_04_930Z-debug.log The command '/bin/sh -c npm i -g yarn' returned a non-zero code: 239

franciscof5 avatar Jul 31 '21 18:07 franciscof5

@franciscof5 Not sure if you fixed this, but you just need to comment out/get rid of RUN npm i -g yarn in the Dockerfile in the root of the repo. New base images already contain yarn so you don't need this.

While you're at it you might want to bump the base image at the beginning of the Dockerfile to use node 12 (or higher) instead of 8 - otherwise you'll see errors with lerna and other packages.

ronvohra avatar Apr 16 '22 18:04 ronvohra