atom-archive / node-runas

Run command synchronously (with Administrator privilege)
MIT License
47 stars 20 forks source link

failed at the runas@0.5.4 Script #5

Closed weems closed 10 years ago

weems commented 10 years ago

"gyp ERR! cwd C:\Users\hestia\Documents\GitHub\atom\node_modules\runas gyp ERR! node -v v0.10.26 gyp ERR! node-gyp -v v0.12.2 gyp ERR! not ok npm ERR! runas@0.5.4 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the runas@0.5.4 install script. npm ERR! This is most likely a problem with the runas package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls runas npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601 npm ERR! command "E:\Program Files\nodejs\node.exe" "E:\Program Files\node "install" "runas" npm ERR! cwd C:\Users\hestia\Documents\GitHub\atom npm ERR! node -v v0.10.26 npm ERR! npm -v 1.4.3 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! C:\Users\hestia\Documents\GitHub\atom\npm-debug.log npm ERR! not ok code 0"

leops commented 10 years ago

I had a similar error, the output log of the atom build script isn't very explanatory, but when doing a simple npm install runas it told me that python wasn't found. Installing python (v2.7, the 3.4 isnt supported) solved it for me.

SutterCain commented 10 years ago

I also had the python problem. But solving this leads to a Visual Studion problem (sorry it's in german): C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform.Targets(23,7): error MSB8007: Die Platt form für Projekt "runas.vcxproj" ist ungültig. Plattform="x64". Diese Meldung wird unter Umständen angezeigt, da ein P rojekt ohne Projektmappendatei erstellt werden sollte und da eine nicht standardmäßige Plattform angegeben wurde, die f ür das Projekt nicht vorhanden ist. [C:\Users\Sutter_Cain\node_modules\runas\build\runas.vcxproj]

It seems this could be related to this issue: https://github.com/TooTallNate/node-gyp/issues/112

probablycorey commented 10 years ago

I'm running into this same problem:

Node: v0.10.28 64bit Python: v2.7.6 64bit Windows: 8.1

When I run npm install This is the output I get:

> node-gyp rebuild

C:\Users\corey\Documents\GitHub\node-runas>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_m
odules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform.Targets(23,7): error MSB8007: The Platf
orm for project 'runas.vcxproj' is invalid.  Platform='x64'. You may be seeing this message because you are trying to b
uild a project without a solution file, and have specified a non-default Platform that doesn't exist for this project.
[C:\Users\corey\Documents\GitHub\node-runas\build\runas.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:2
67:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:807:12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuil
d"
gyp ERR! cwd C:\Users\corey\Documents\GitHub\node-runas
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok

npm ERR! runas@0.5.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the runas@0.5.4 install script.
npm ERR! This is most likely a problem with the runas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls runas
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"
 "instal"
npm ERR! cwd C:\Users\corey\Documents\GitHub\node-runas
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\corey\Documents\GitHub\node-runas\npm-debug.log
npm ERR! not ok code 0
probablycorey commented 10 years ago

@zcbenz does this have anything to do with node or pythong being 64bit? https://github.com/atom/atom/pull/2239#discussion_r12671730

zcbenz commented 10 years ago

Have you installed Windows 7 64-bit SDK? There are some requirements by node-gyp: https://github.com/TooTallNate/node-gyp#installation.

probablycorey commented 10 years ago

@zcbenz I'm using Windows 8.1 so the Windows 7 64-bit SDK refuses to install.

Housi commented 10 years ago

Make sure you have Python27 in your System Path. If you have both 2.7 and 3+ installed, you likely have 3+ folder there.

probablycorey commented 10 years ago

@Housi I added C:\Python27;C:\Python27\Lib\site-packages\;C:\Python27\Scripts\ to my PATH but still get the same error.

zcbenz commented 10 years ago

@probablycorey This page has some instructions on installing SDK 7.1 on Windows 8.

.NET Framework 4.5 already installed or using Windows 8

If you have .NET Framework 4.5 installed, or are using Windows 8, SDK 7.1 may fail to install.  In this case:

1.Uninstall .NET Framework 4.5.
2.Install the SDK 7.1 using the instructions above.
3.Reinstall .NET Framework 4.5 if needed.

If SDK 7.1 is installed successfully, but with a message saying .NET 4 could not be installed due to the presence of .NET 4.5, you may need to uninstall .NET 4.5 first as well and retry.

Microsoft Visual Studio C++ 2010 SP1 already installed

If Microsoft Visual Studio C++ 2010 SP1 is already installed, SDK 7.1 may fail to install.  In this case:

1.Remove the 2010 Redistributable packages (both x86 and x64).
2.Install SDK 7.1 using the instructions above.
3.Apply the SDK 7.1 patch.
4.Reinstall 2010 Redistributable packages if needed.

If you have both Microsoft Visual Studio C++ 2010 SP1 and SDK 7.1 installed, but running into various errors during compilation, apply the SDK 7.1 patch to fix the issue.

The reason we need Windows SDK 7.1 is the x64 toolchains included in it, if we use x86 node then Windows SDK would not be needed.

Also VS2010 is only a requirement of atom-shell and libchromiumcontent, normal requirements of building node native modules should be enough for building Atom solely, so in theory VS2012 and VS2013 without installation of Windows SDK would also work.

probablycorey commented 10 years ago

Thanks @zcbenz, I'll update the docs!

JuanCAlpizar commented 10 years ago

I got an issue today with runas...

I'm running windows 7 64 bits, and I'm getting the following error stack trace:

$ npm -g install runas
npm http GET https://registry.npmjs.org/runas
npm http 304 https://registry.npmjs.org/runas
npm http GET https://registry.npmjs.org/nan
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/nan
> runas@0.5.4 install C:\Users\JC\AppData\Roaming\npm\node_modules\runas
> node-gyp rebuild
C:\Users\JC\AppData\Roaming\npm\node_modules\runas>node "c:\Program Files\nodejs
\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js"
 rebuild
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
  main.cc
  runas_win.cc
C:\Users\JC\AppData\Roaming\npm\node_modules\runas\node_modules\nan\nan.h(1066)
: warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss
of data [C:\Users\JC\AppData\Roaming\npm\node_modules\runas\build\runas.vcxproj
]
C:\Users\JC\AppData\Roaming\npm\node_modules\runas\node_modules\nan\nan.h(1083)
: warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss
of data [C:\Users\JC\AppData\Roaming\npm\node_modules\runas\build\runas.vcxproj
]
C:\Users\JC\AppData\Roaming\npm\node_modules\runas\node_modules\nan\nan.h(1114)
: warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss
of data [C:\Users\JC\AppData\Roaming\npm\node_modules\runas\build\runas.vcxproj
]
C:\Users\JC\AppData\Roaming\npm\node_modules\runas\node_modules\nan\nan.h(1146)
: warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss
of data [C:\Users\JC\AppData\Roaming\npm\node_modules\runas\build\runas.vcxproj
]
C:\Users\JC\AppData\Roaming\npm\node_modules\runas\node_modules\nan\nan.h(934):
 warning C4244: 'initializing' : conversion from '__int64' to 'int', possible l
oss of data [C:\Users\JC\AppData\Roaming\npm\node_modules\runas\build\runas.vcx
proj]
          C:\Users\JC\AppData\Roaming\npm\node_modules\runas\node_modules\nan\n
  an.h(1127) : see reference to function template instantiation 'size_t _nan_ba
  se64_decode(char *,size_t,const TypeName *,const size_t)' being com
  piled
          with
          [
              TypeName=uint16_t
          ]
LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [C:\Users\JC\
AppData\Roaming\npm\node_modules\runas\build\runas.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (c:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:807:
12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "c:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\JC\AppData\Roaming\npm\node_modules\runas
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm ERR! runas@0.5.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the runas@0.5.4 install script.
npm ERR! This is most likely a problem with the runas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls runas
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodej
s\\node_modules\\npm\\bin\\npm-cli.js" "-g" "install" "runas"
npm ERR! cwd c:\atom\script
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     c:\atom\script\npm-debug.log
npm ERR! not ok code 0

It says it's a configuration in the runas.vcxproj but since the project it's not in my PC, how can I fix it?

kevinmorio commented 10 years ago

I got an issue too..

Running Windows 8.1 and getting the following error:

c:\atom\node_modules\runas>node "c:\Program Files\nodejs\node_modules\npm\bin\no
de-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parall
ele Erstellung zu ermöglichen, müssen Sie den Schalter "/m" hinzufügen.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(29
7,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry.
  TargetFrameworkVersion or PlatformToolset may be set to an invalid version nu
mber. [c:\atom\node_modules\runas\build\runas.vcxproj]
  main.cc
  runas_win.cc
c:\atom\node_modules\runas\src\runas.h(4): fatal error C1083: Datei (Include) k
ann nicht geöffnet werden: "string": No such file or directory (..\src\runas_wi
n.cc) [c:\atom\node_modules\runas\build\runas.vcxproj]
C:\Users\Kevin_000\.node-gyp\0.10.28\deps\uv\include\uv.h(56): fatal error C108
3: Datei (Include) kann nicht geöffnet werden: "stdint.h": No such file or dire
ctory (..\src\main.cc) [c:\atom\node_modules\runas\build\runas.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (c:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:807:
12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "c:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd c:\atom\node_modules\runas
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm ERR! runas@0.5.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the runas@0.5.4 install script.
npm ERR! This is most likely a problem with the runas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls runas
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodej
s\\node_modules\\npm\\bin\\npm-cli.js" "install" "runas"
npm ERR! cwd c:\atom
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     c:\atom\npm-debug.log
npm ERR! not ok code 0
ocombe commented 10 years ago

I installed microsoft visual studio express 2013 and it fixed the problem for me (on windows 8.1 x64)

lhk commented 10 years ago

I got a problem with node-gyp, too: node-gyp rebuild fails and a package that uses it, can't be installed. The package is autocomplete-clang.

None of the proposed solutions work for me. See here: https://discuss.atom.io/t/node-gyp-is-failing/9245/3

chuandadexiaoyu commented 9 years ago

It is really the reason that python not installed well : ( ?