Recently, I ran accross a npm install
issue, where I had to do either: npm install --legacy-peer-deps
either npm config set legacy-peer-deps true
.
I'm not really sure why, but anyway, since it's a team project, that we have some devops scripts, I would like to know if there is a way to basically have a file with information on how npm should be configured for the team.
Something in the package.json or an.something to make sure everybody using this repository have a the npm config set legacy-peer-deps true
?
Thank you
Try adding a per-project configuration file , aka a .npmrc
file that sits alongside package.json
and is committed into source control.
# .npmrc
legacy-peer-deps=true
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.