【发布时间】:2020-05-07 06:48:49
【问题描述】:
我认为我需要构建一些 javascript 图像库 (sharp js) 的二进制文件,并且我有一个来自 sharp js 文档的 docker 命令,但它似乎无法正常工作
docker run -v "$PWD":/var/task lambci/lambda:build-nodejs12.x npm install sharp
我在win10上运行这个。顺便说一句,我只知道 docker 基础知识。我从 npm 得到了很好的输出,但我在任何地方都看不到这些库。
$ docker run -v "$PWD":/var/task lambci/lambda:build-nodejs12.x npm install sharp
> sharp@0.25.2 install /var/task/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install --runtime=napi) || (node-gyp rebuild && node install/dll-copy)
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.9.1/libvips-8.9.1-linux-x64.tar.gz
npm WARN saveError ENOENT: no such file or directory, open '/var/task/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/var/task/package.json'
npm WARN task No description
npm WARN task No repository field.
npm WARN task No README data
npm WARN task No license field.
+ sharp@0.25.2
added 76 packages from 154 contributors and audited 163 packages in 10.221s
2 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
此命令不断创建一个名为“imageProcessing;C”的目录,该目录为空。或者,有没有一种方法可以将 git repo 中的库以某种方式复制到我的 node_modules 文件夹中?
我正在尝试使用无服务器框架将库部署到 Lambda。谢谢!
【问题讨论】:
标签: javascript amazon-web-services docker npm sharp