Uploaded image for project: 'GPII - Global Public Inclusive Infrastructure'
  1. GPII - Global Public Inclusive Infrastructure
  2. GPII-1929

Can't build certain dependencies on Windows with node 6

    XMLWordPrintable

    Details

      Description

      On windows, when running "npm install", the process fails as it follows:

      > bufferutil@1.2.1 install c:\vagrant\node_modules\bufferutil
      > node-gyp rebuild
      
      
      c:\vagrant\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
      Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
        bufferutil.cc
      ..\src\bufferutil.cc(16): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [c:\vagrant\n
      ode_modules\bufferutil\build\bufferutil.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:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276: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:204:12)
      gyp ERR! System Windows_NT 10.0.10240
      gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
      gyp ERR! cwd c:\vagrant\node_modules\bufferutil
      gyp ERR! node -v v6.3.1
      gyp ERR! node-gyp -v v3.3.1
      gyp ERR! not ok
      npm WARN install:bufferutil@1.2.1 bufferutil@1.2.1 install: `node-gyp rebuild`
      npm WARN install:bufferutil@1.2.1 Exit status 1
      
      > ref@1.3.2 install c:\vagrant\node_modules\ref
      > node-gyp rebuild
      
      
      c:\vagrant\node_modules\ref>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
      Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
        binding.cc
      ..\src\binding.cc(7): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [c:\vagrant\node_
      modules\ref\build\binding.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:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276: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:204:12)
      gyp ERR! System Windows_NT 10.0.10240
      gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
      gyp ERR! cwd c:\vagrant\node_modules\ref
      gyp ERR! node -v v6.3.1
      gyp ERR! node-gyp -v v3.3.1
      gyp ERR! not ok
      

      After some investigations, I can confirm that the problem is that nan isn't included properly in the node-gyp's build chain and that this only happens when you are operating on a "windows remote/shared folder".

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jhernandez Javier Hernández
              Reporter:
              jhernandez Javier Hernández
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: