deban安装nodjs
xuexi 2026-03-30 09:32:53 发表在:PHP 查看数:4
# 1. 安装Node.js 20.x LTS(Debian/Ubuntu专属,适配Laravel 13)
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs

# 2. 验证安装(必须显示版本号)
node -v
npm -v

# 3. (可选)切换淘宝镜像,大幅提升npm下载速度
npm config set registry https://registry.npmmirror.com

# 4. 进入Laravel项目,完成前端编译
cd /xp/www/laravel13.com
npm install
npm run build
最近访问时间:2026-03-30 13:57:46
知识库:432条鸣谢:TAY  备案号:蜀ICP备2024090044号