,

阿里云⠸Killed = 服务器内存不足,系统 OOM 杀死 npm 进程

阿里云低配机器(1C/512M、1G 内存装 Nest 极易出现)。 改用 pnpm 安装(比 npm 占用内…

阿里云低配机器(1C/512M、1G 内存装 Nest 极易出现)。

改用 pnpm 安装(比 npm 占用内存低很多)

# 先基础核心
pnpm add @nestjs/core @nestjs/common reflect-metadata rxjs
# 再其他依赖
pnpm add 剩下包名

sh: nest: command not found

报错原因
nest: command not found:没全局装 @nestjs/cli,也没局部调用项目内 nest
解决 1:本地调用(推荐,不用全局装 cli)
bash
运行
# 1.先确认依赖齐全
pnpm install --prod

# 用npx调用项目里本地nest
npx nest build
解决 2:全局安装 nest-cli
bash
运行
pnpm add -g @nestjs/cli
pnpm run build

Previous Post

Next Post

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

About the Author

每个人都有自己得时区,在自己得时区里,一切都是准时的。

BlockSpare — News, Magazine and Blog Addons for (Gutenberg) Block Editor