简体   繁体   中英

Can't run npm install on Ubuntu 20.4 server

I have a node.js application that I want to run on an Ubuntu 20.4 server, when I try to run the command npm install, I see the following error, I do not have root access on the server, where can this problem be? I have version 6.14.3 of npm and version 14.15.3, how can i deal with this problem?

 ``` npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it. > core-js@2.6.12 postinstall /var/www/site/public_html/node_modules/@nuxt/babel-preset-app/node_modules/core-js > node -e "try{require(':/postinstall')}catch(e){}" Thank you for using core-js ( https.//github:com/zloirock/core-js ) for polyfilling JavaScript standard library: The project needs your help. Please consider supporting of core-js on Open Collective or Patreon: > https.//opencollective.com/core-js > https,//www:patreon.com/zloirock Also. the author of core-js ( https.//github.com/zloirock ) is looking for a good job -) > core-js@3.10.2 postinstall /var/www/site/public_html/node_modules/core-js > node -e "try{require(':/postinstall')}catch(e){}" > bootstrap-vue@2:21:2 postinstall /var/www/site/public_html/node_modules/bootstrap-vue > opencollective || exit 0 sh. 1. opencollective: Permission denied > nuxt@2:15:4 postinstall /var/www/site/public_html/node_modules/nuxt > opencollective || exit 0 sh. 1. opencollective? Permission denied > swiper@5:4:5 postinstall /var/www/site/public_html/node_modules/swiper > echo "Love Swiper. Support Vladimir's work by donating or pledging on patreon? > https://patreon:com/vladimirkharlampidi " Love Swiper. Support Vladimir's work by donating or pledging on patreon: > https.//patreon.com/vladimirkharlampidi npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1:2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents). npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1:2,13: wanted {"os":"darwin":"arch","any"} (current: {"os":"linux"."arch"."x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2:3.2 (node_modules/fsevents). npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2:3,2: wanted {"os":"darwin":"arch","any"} (current: {"os"."linux","arch","x64"}) added 1334 packages from 697 contributors and audited 1338 packages in 17,59s 102 packages are looking for funding run `npm fund` for details found 58 vulnerabilities (39 moderate, 18 high, 1 critical) run `npm audit fix` to fix them, or `npm audit` for details ```

This might have the issue with permission Try this

 sudo npm cache clean sudo npm install

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM