节点JS NPM安装错误

问题描述:

在尝试使用NPM获取程序包时,出现错误后不断收到错误。 我已经解决了大部分,但现在我得到这样的:节点JS NPM安装错误

rs\kevin\Desktop\adwordsapi\node_modules\ursa\build\ursaNative.vcxproj] 
LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libeay32.lib' [C:\Users\kevin\Desktop\adwordsa 
pi\node_modules\ursa\build\ursaNative.vcxproj] 
gyp ERR! build error 
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onExit (C:\Users\kevin\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib 
\build.js:258:23) 
gyp ERR! stack  at emitTwo (events.js:106:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:191:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) 
gyp ERR! System Windows_NT 6.3.9600 
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\kevin\\AppData\\Roaming\\npm\\node_modules\\npm\\node 
_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd C:\Users\kevin\Desktop\adwordsapi\node_modules\ursa 
gyp ERR! node -v v6.11.0 
gyp ERR! node-gyp -v v3.6.2 
gyp ERR! not ok 
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\kevin\Desktop\adwordsapi\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 'C:\Users\kevin\Desktop\adwordsapi\package.json' 
npm WARN adwordsapi No description 
npm WARN adwordsapi No repository field. 
npm WARN adwordsapi No README data 
npm WARN adwordsapi No license field. 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\ursa): 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild` 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 

我不知道发生了什么事情,希望你们中的一些可以帮助

+0

它清楚地表明它无法找到你的'package.json'文件。移动到包含'package,json'的目录,然后运行'npm install' –

+0

似乎缺少用于编译本地ursa模块的“C:\ OpenSSL-Win64 \ lib \ libeay32.lib”文件。 – vincent

望着链接错误在你错误输出,看起来您缺少一些必需的依赖项来编译本机模块。

在Windows上安装ursa节点模块需要一些额外的准备步骤。有关更多文档,请查看https://www.npmjs.com/package/ursa#windows-install

希望这会有所帮助。