繁体   English   中英

节点插件编译错误

[英]Node addon compilation error

我是为节点创建c ++插件的新手。
我安装了Windows-build-tools,并在运行node-gyp build之后遇到了一个奇怪的问题。

在问这个问题之前,我曾尝试做一些研究,但它似乎没有明确的答案。

我还尝试过重新安装node-gyp和构建工具。

我的问题是此问题的原因是什么以及如何解决它

node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@9.5.0 | win32 | x64
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
Projekty w tym rozwiązaniu są tworzone po kolei. Aby umożliwić tworzenie równoległe, dodaj przełącznik "/m".
C:\Users\maciek\.node-gyp\9.5.0\x64\node.lib : fatal error LNK1106: invalid file or disk full: cannot seek to 0x1E5CBE [C:\Users\maci
ek\Desktop\mcn\build\myModule.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\maciek\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:160:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\maciek\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build"
gyp ERR! cwd C:\Users\maciek\Desktop\mcn
gyp ERR! node -v v9.5.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

我有这个问题。 通过以下步骤解决了

步骤1确保已安装Phython并在系统变量中安装了路径

尝试立即安装npm

如果现在可以正常工作,请继续执行第二步

步骤2删除.node-gyp文件夹并再次安装node-gyp

暂无
暂无

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

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