简体   繁体   English

npm module Imager安装

[英]npm module Imager installation

I have been trying to install npm package because for some odd reason the module and GraphicsMagick library vanished into thin air from my machine(but that is a discussion for some other day). 我一直在尝试安装npm软件包,因为出于某些奇怪的原因,模块和GraphicsMagick库从我的机器上消失了(但这是前几天的讨论)。

Now I have installed the library but when I run 现在我已经安装了库,但是当我运行时

sudo npm install --save imager sudo npm install-保存图像

I get a long list of errors. 我收到一长串错误。 starting from 从...开始

Error: ENOENT, lstat '/home/user/Desktop/project/node_modules/imager/node_modules/pkgcloud/node_modules/request/node_modules/json-stringify-safe/LICENSE' 错误:ENOENT,lstat'/ home / user / Desktop / project / node_modules / imager / node_modules / pkgcloud / node_modules / request / node_modules / json-stringify-safe / LICENSE'

any help would be appreciated. 任何帮助,将不胜感激。

Many npm modules are skins over previously written native code projects. 许多npm模块是以前编写的本机代码项目的外观。
In this case : GraphicsMagick 在这种情况下:GraphicsMagick

If you first do the install of GraphicsMagick (outside of node/npm) or whichever is the underlying project. 如果您首先执行GraphicsMagick的安装(在node / npm之外)或基础项目中的任何一个。 Get it up and running and only then do the npm install of its skin it will work. 启动并运行它,然后进行皮肤的npm安装,它将起作用。 I just did these steps on ubuntu for npm module imager and the install worked fine. 我只是在ubuntu上为npm module imager做了这些步骤,安装工作正常。

Understand the meaning of npm install with a -g flag (global) - If the module makes available a command line executable then do npm install -g xxxx 通过-g标志(全局)了解npm install的含义-如果模块提供了命令行可执行文件,则执行npm install -g xxxx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM