1

I am new to creating c++ addons for node.
I've instaled windows-build-tools and after running node-gyp build I've encountered a strange problem.

I tryed to do some research before asking this question but it seams there is no clear answer.

I've also tryed reinstaling node-gyp and build tools.

My question is what is the cause of this problem and how to fix it

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
4

1 回答 1

0

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

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

立即尝试 npm 安装

如果它现在可以继续执行第二步

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

于 2018-05-10T06:24:24.950 回答