mx-space / core

😎 The next generation of RESTful API service and more feature for Mix Space, powered by @nestjs.
Other
368 stars 105 forks source link

Docker部署依赖问题 #2119

Closed YKMdB3p closed 1 month ago

YKMdB3p commented 1 month ago

Describe the bug

v6.0.3之后的版本引入了sharp依赖,但使用Docker部署镜像无法正常安装sharp,图像相关的功能不能正常工作。

Reproduction

Docker平台部署

System Info

Installing sharp...
added 11 packages, and audited 12 packages in 20s
3 packages are looking for funding
  run `npm fund` for details
found 0 vulnerabilities
 ERROR   [ImageService]  sharp install failed: Cannot find module 'sharp'
Require stack:
- /root/.mx-space/node_modules 
 ERROR  Cannot find module 'sharp'
Require stack:
- /root/.mx-space/node_modules
  Require stack:
  - /root/.mx-space/node_modules
  at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
  at Module._load (node:internal/modules/cjs/loader:1051:27)
  at Module.require (node:internal/modules/cjs/loader:1311:19)
  at require (node:internal/modules/helpers:179:18)
  at requireDepsWithInstall (entrypoints.js:2:645150)
  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Validations

linear[bot] commented 1 month ago

MXD-152 Docker部署依赖问题

Innei commented 1 month ago

fixed 519ba0babe641a309501b621b1daef8e4efa970e

TinsFox commented 1 month ago

用 f8c45e4120f1109 的源码 build 出来的镜像会找不到 sharp

image
AprilNEA commented 1 month ago

latest 依旧有这个问题