Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails on npm install #1

Open
JakeStanger opened this issue Jul 3, 2017 · 11 comments
Open

Fails on npm install #1

JakeStanger opened this issue Jul 3, 2017 · 11 comments

Comments

@JakeStanger
Copy link

npm install does not work due to the mediakeys module, throwing the error mediakeys@0.2.0 install: node-gyp rebuild. I can't find any fix to this; is there a known workaround?

@elan
Copy link
Member

elan commented Jul 10, 2017

It worked over here on macOS with node v8.1.3:

$ ❯ npm install

> mediakeys@0.2.0 install /private/tmp/webhooks-notifications/node_modules/mediakeys
> node-gyp rebuild

2017-07-10 11:58:28.690 xcodebuild[49702:4344117] [MT] PluginLoading: Required plug-in compatibility UUID DFFB3951-EB0A-4C09-9DAC-5F2D28CC839C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ShowInGithub.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2017-07-10 11:58:28.690 xcodebuild[49702:4344117] [MT] PluginLoading: Required plug-in compatibility UUID DFFB3951-EB0A-4C09-9DAC-5F2D28CC839C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/GitDiff.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2017-07-10 11:58:28.691 xcodebuild[49702:4344117] [MT] PluginLoading: Required plug-in compatibility UUID DFFB3951-EB0A-4C09-9DAC-5F2D28CC839C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/BBUDebuggerTuckAway.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2017-07-10 11:58:28.691 xcodebuild[49702:4344117] [MT] PluginLoading: Required plug-in compatibility UUID DFFB3951-EB0A-4C09-9DAC-5F2D28CC839C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin' not present in DVTPlugInCompatibilityUUIDs
  CXX(target) Release/obj.target/keylistener/osx/FMMediaKeyDelegate.o
../osx/FMMediaKeyDelegate.m:26:13: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
            utf8);
            ^~~~
../osx/FMMediaKeyDelegate.m:26:13: note: treat the string as an argument to avoid this
            utf8);
            ^
            "%s",
../osx/FMMediaKeyDelegate.m:19:19: warning: unused variable 'len' [-Wunused-variable]
    unsigned long len = strlen(utf8);
                  ^
2 warnings generated.
  CXX(target) Release/obj.target/keylistener/osx/main.o
  CXX(target) Release/obj.target/keylistener/osx/SPMediaKeyTap.o
../osx/SPMediaKeyTap.m:25:35: warning: semicolon before method body is ignored [-Wsemicolon-before-method-body]
-(id)initWithDelegate:(id)delegate;
                                  ^
../osx/SPMediaKeyTap.m:51:15: warning: semicolon before method body is ignored [-Wsemicolon-before-method-body]
-(void)dealloc;
              ^
../osx/SPMediaKeyTap.m:60:33: warning: semicolon before method body is ignored [-Wsemicolon-before-method-body]
-(void)startWatchingAppSwitching;
                                ^
../osx/SPMediaKeyTap.m:72:32: warning: semicolon before method body is ignored [-Wsemicolon-before-method-body]
-(void)stopWatchingAppSwitching;
                               ^
../osx/SPMediaKeyTap.m:79:30: warning: semicolon before method body is ignored [-Wsemicolon-before-method-body]
-(void)startWatchingMediaKeys;{
                             ^
../osx/SPMediaKeyTap.m:100:29: warning: semicolon before method body is ignored [-Wsemicolon-before-method-body]
-(void)stopWatchingMediaKeys;
                            ^
../osx/SPMediaKeyTap.m:137:49: warning: semicolon before method body is ignored [-Wsemicolon-before-method-body]
+ (NSArray*)defaultMediaKeyUserBundleIdentifiers;
                                                ^
../osx/SPMediaKeyTap.m:164:37: warning: semicolon before method body is ignored [-Wsemicolon-before-method-body]
-(BOOL)shouldInterceptMediaKeyEvents;
                                    ^
../osx/SPMediaKeyTap.m:173:40: warning: semicolon before method body is ignored [-Wsemicolon-before-method-body]
-(void)pauseTapOnTapThread:(BOOL)yeahno;
                                       ^
../osx/SPMediaKeyTap.m:177:57: warning: semicolon before method body is ignored [-Wsemicolon-before-method-body]
-(void)setShouldInterceptMediaKeyEvents:(BOOL)newSetting;
                                                        ^
../osx/SPMediaKeyTap.m:252:22: warning: semicolon before method body is ignored [-Wsemicolon-before-method-body]
-(void)eventTapThread;
                     ^
../osx/SPMediaKeyTap.m:266:30: warning: semicolon before method body is ignored [-Wsemicolon-before-method-body]
-(void)mediaKeyAppListChanged;
                             ^
../osx/SPMediaKeyTap.m:293:50: warning: semicolon before method body is ignored [-Wsemicolon-before-method-body]
-(void)appIsNowFrontmost:(ProcessSerialNumber)psn;
                                                 ^
../osx/SPMediaKeyTap.m:310:46: warning: semicolon before method body is ignored [-Wsemicolon-before-method-body]
-(void)appTerminated:(ProcessSerialNumber)psn;
                                             ^
14 warnings generated.
  CXX(target) Release/obj.target/keylistener/osx/StdinListener.o
  LINK(target) Release/keylistener
  CXX(target) Release/obj.target/binding/dummy.o
  SOLINK_MODULE(target) Release/binding.node
npm notice created a lockfile as package-lock.json. You should commit this file.
added 154 packages in 13.746s
[Mon 11:58 AM] /tmp/webhooks-notifications (master*) $ ❯

@JakeStanger
Copy link
Author

Perhaps this is just a Linux bug? I should have specified that really - I'm running Arch Linux. Is anybody able to test on another Linux machine?

@elan
Copy link
Member

elan commented Jul 11, 2017

Ah yeah, it fails for me too on Linux with node 6.x, maybe it needs a newer node?

@JakeStanger
Copy link
Author

Ah more useful information I neglected...
I'm running node v8.0.0 so it seems not.

@ebeeson
Copy link

ebeeson commented Jul 12, 2017

Note that the README for mediakeys mentions:

Linux requires apt-get install dbus, dbus-devel, or equivalent.

@JakeStanger
Copy link
Author

I know for sure I have dbus installed and checked this several times trying to install mediakeys

@UnhealthyKraken
Copy link

UnhealthyKraken commented Sep 12, 2017

This is all new to me, I'm trying to figure out why this isnt working for me.
Can anyone shed some light?

`This is all new to me, I'm trying to figure out why this isnt working for me.
Can anyone shed some light?

`$ npm install

mediakeys@0.2.0 install C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys
node-gyp rebuild

C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys>if not defined npm_config_node_gyp (node "C:\Users\USER\AppData\Roaming\npm\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.
MMShellHook.cpp
win_delay_load_hook.cc
Creating library C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\Release\MMShellHook.lib and object C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\Release\MMShellHook.exp
win_delay_load_hook.obj : error LNK2001: unresolved external symbol _stricmp [C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\win\MMShellHook.vcxproj]
C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\Release\MMShellHook.dll : fatal error LNK1120: 1 unresolved externals [C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\win\MMShellHook.vcxproj]
win.cpp
win_delay_load_hook.cc
....\win\win.cpp(378): warning C4244: 'return': conversion from 'WPARAM' to 'int', possible loss of data [C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\win\keylistener.vcxproj]
win.obj : warning LNK4258: directive '/ENTRY:mainCRTStartup' not compatible with switch '/ENTRY:WinMainCRTStartup'; ignored [C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\win\keylistener.vcxproj]
Generating code
Finished generating code
keylistener.vcxproj -> C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\Release\keylistener.exe
keylistener.vcxproj -> C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\Release\keylistener.pdb (Full PDB)
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\USER\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:219:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\USER\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys
gyp ERR! node -v v6.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN Error: EPERM: operation not permitted, unlink 'C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\bindings\package.json'
npm WARN at Error (native)
npm WARN { Error: EPERM: operation not permitted, unlink 'C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\bindings\package.json'
npm WARN at Error (native)
npm WARN stack: 'Error: EPERM: operation not permitted, unlink 'C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\bindings\package.json'\n at Error (native)',
npm WARN errno: -4048,
npm WARN code: 'EPERM',
npm WARN syscall: 'unlink',
npm WARN path: 'C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\bindings\package.json' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mediakeys@0.2.0 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mediakeys@0.2.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\USER\AppData\Roaming\npm-cache_logs\2017-09-12T21_34_36_461Z-debug.log
`

@ebeeson
Copy link

ebeeson commented Sep 12, 2017

@Biffaboy: It looks like you're running node v6. Can you try again with a more recent version of node?

@UnhealthyKraken
Copy link

$ npm install

mediakeys@0.2.0 install C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys
node-gyp rebuild

C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys>if not defined npm_config_node_gyp (node "C:\Users\USER\AppData\Roaming\npm\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.
MMShellHook.cpp
win_delay_load_hook.cc
Creating library C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\Release\MMShellHook.lib and object C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\Release\MMShellHook.exp
win_delay_load_hook.obj : error LNK2001: unresolved external symbol _stricmp [C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\win\MMShellHook.vcxproj]
C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\Release\MMShellHook.dll : fatal error LNK1120: 1 unresolved externals [C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\win\MMShellHook.vcxproj]
win.cpp
win_delay_load_hook.cc
....\win\win.cpp(378): warning C4244: 'return': conversion from 'WPARAM' to 'int', possible loss of data [C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\win\keylistener.vcxproj]
win.obj : warning LNK4258: directive '/ENTRY:mainCRTStartup' not compatible with switch '/ENTRY:WinMainCRTStartup'; ignored [C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\win\keylistener.vcxproj]
Generating code
Finished generating code
keylistener.vcxproj -> C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\Release\keylistener.exe
keylistener.vcxproj -> C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\Release\keylistener.pdb (Full PDB)
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\USER\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\USER\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys
gyp ERR! node -v v8.5.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN Error: EPERM: operation not permitted, unlink 'C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\bindings\package.json'
npm WARN { Error: EPERM: operation not permitted, unlink 'C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\bindings\package.json'
npm WARN stack: 'Error: EPERM: operation not permitted, unlink 'C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\bindings\package.json'',
npm WARN errno: -4048,
npm WARN code: 'EPERM',
npm WARN syscall: 'unlink',
npm WARN path: 'C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\bindings\package.json' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mediakeys@0.2.0 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mediakeys@0.2.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\USER\AppData\Roaming\npm-cache_logs\2017-09-12T22_34_18_012Z-debug.log

@ebeeson
Copy link

ebeeson commented Sep 12, 2017

@Biffaboy: now the logs look like it's complaining about your installed version of Visual Studio (or related tools)?

...
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build tools for v120 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, please install v120 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\USER\Documents\GitHub\webhooks-notifications\node_modules\mediakeys\build\win\keylistener.vcxproj]
...

I'm sorry, I don't have a Windows installation to try and reproduce this, but it seems like the problem you're having is related to building mediakeys. You might find more informative responses by asking about this over there.

@UnhealthyKraken
Copy link

@ebeeson Seems to be Media Keys, Ive resolved the issue with the tools, and seems mediakeys is the issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants