Code Monkey home page Code Monkey logo

Comments (5)

shangxinbo avatar shangxinbo commented on June 11, 2024

same error

from volta.

chriskrycho avatar chriskrycho commented on June 11, 2024

How odd! Can you share the results of running with RUST_BACKTRACE=1, as the error output indicates? That will help us see why it's going wrong that way.

from volta.

shangxinbo avatar shangxinbo commented on June 11, 2024

我试过了,使用volta或者类似的node管理工具时,node和PM2安装是只给一个用户安装,所以在执行sudo命令时会有问题,可以尝试给root安装pm2解决。
因为这个问题我决定以后再也不用nvm,volta这种东西了


Edit by @chriskrycho: Adding an automated translation from Apple:

I have tried. When using volta or similar node management tools, node and PM2 installation are only installed for one user, so there will be problems when executing sudo commands. You can try to install pm2 for root.

Because of this problem, I decided not to use nvm and volta again.

from volta.

halofe avatar halofe commented on June 11, 2024

The command succeed after sudo -i

➜  ~ pm2 startup
[PM2] Init System found: systemd
[PM2] To setup the Startup Script, copy/paste the following command:
sudo env PATH=$PATH:/home/ubuntu/.volta/tools/image/node/21.1.0/bin /home/ubuntu/.volta/tools/image/packages/pm2/lib/node_modules/pm2/bin/pm2 startup systemd -u ubuntu --hp /home/ubuntu
➜  ~ sudo -i
root@e1:~# env PATH=$PATH:/home/ubuntu/.volta/tools/image/node/21.1.0/bin /home/ubuntu/.volta/tools/image/packages/pm2/lib/node_modules/pm2/bin/pm2 startup systemd -u ubuntu --hp /home/ubuntu
[PM2] Init System found: systemd

from volta.

halofe avatar halofe commented on June 11, 2024

How odd! Can you share the results of running with RUST_BACKTRACE=1, as the error output indicates? That will help us see why it's going wrong that way.

Tried with RUST_BACKTRACE=1, error with "pm2 not found"

from volta.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.