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

Test Notification Error #468

Closed
FilipKAudio opened this issue Oct 7, 2020 · 18 comments
Closed

Test Notification Error #468

FilipKAudio opened this issue Oct 7, 2020 · 18 comments
Assignees

Comments

@FilipKAudio
Copy link

Description

When I run the "npm run test:notification" command I get this error and not receive any notifications:

TypeError: Cannot read property 'logLevel' of undefined
at Object. (c:\nvidia-snatcher\build\logger.js:22:28)
at Module._compile (internal/modules/cjs/loader.js:1085:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:791:14)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (c:\nvidia-snatcher\build\config.js:10:16)
at Module._compile (internal/modules/cjs/loader.js:1085:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nvidia-snatcher@1.5.0 test:notification: npm run build && node build/__test__/notification-test.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nvidia-snatcher@1.5.0 test:notification 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\Filip\AppData\Roaming\npm-cache_logs\2020-10-07T04_42_51_481Z-debug.log

Debug Log:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'test:notification'
1 verbose cli ]
2 info using npm@6.14.8
3 info using node@v14.13.0
4 verbose run-script [
4 verbose run-script 'pretest:notification',
4 verbose run-script 'test:notification',
4 verbose run-script 'posttest:notification'
4 verbose run-script ]
5 info lifecycle nvidia-snatcher@1.5.0pretest:notification: nvidia-snatcher@1.5.0
6 info lifecycle nvidia-snatcher@1.5.0
test:notification: nvidia-snatcher@1.5.0
7 verbose lifecycle nvidia-snatcher@1.5.0test:notification: unsafe-perm in lifecycle true
8 verbose lifecycle nvidia-snatcher@1.5.0
test:notification: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;c:\nvidia-snatcher\node_modules.bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\ia32\compiler;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\QuickTime\QTSystem;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Users\Filip\AppData\Local\Microsoft\WindowsApps;C:\Users\Filip\AppData\Roaming\npm
9 verbose lifecycle nvidia-snatcher@1.5.0test:notification: CWD: c:\nvidia-snatcher
10 silly lifecycle nvidia-snatcher@1.5.0
test:notification: Args: [
10 silly lifecycle '/d /s /c',
10 silly lifecycle 'npm run build && node build/test/notification-test.js'
10 silly lifecycle ]
11 silly lifecycle nvidia-snatcher@1.5.0test:notification: Returned: code: 1 signal: null
12 info lifecycle nvidia-snatcher@1.5.0
test:notification: Failed to exec test:notification script
13 verbose stack Error: nvidia-snatcher@1.5.0 test:notification: npm run build && node build/__test__/notification-test.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1047:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid nvidia-snatcher@1.5.0
15 verbose cwd c:\nvidia-snatcher
16 verbose Windows_NT 10.0.19041
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "test:notification"
18 verbose node v14.13.0
19 verbose npm v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error nvidia-snatcher@1.5.0 test:notification: npm run build && node build/__test__/notification-test.js
22 error Exit status 1
23 error Failed at the nvidia-snatcher@1.5.0 test:notification script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@LBates2000
Copy link

LBates2000 commented Oct 7, 2020

Same. Also on Windows 10 with Node v14.13.0

@nedh84
Copy link

nedh84 commented Oct 7, 2020

Same deal for me. Here is my log also. Windows 10:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'test:notification'
1 verbose cli ]
2 info using npm@6.14.8
3 info using node@v12.19.0
4 verbose run-script [
4 verbose run-script 'pretest:notification',
4 verbose run-script 'test:notification',
4 verbose run-script 'posttest:notification'
4 verbose run-script ]
5 info lifecycle nvidia-snatcher@1.5.0pretest:notification: nvidia-snatcher@1.5.0
6 info lifecycle nvidia-snatcher@1.5.0
test:notification: nvidia-snatcher@1.5.0
7 verbose lifecycle nvidia-snatcher@1.5.0test:notification: unsafe-perm in lifecycle true
8 verbose lifecycle nvidia-snatcher@1.5.0
test:notification: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Ned\Documents\GitHub\nvidia-snatcher\node_modules.bin;C:\Python39\Scripts;C:\Python39;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Git\cmd;D:\Calibre2;C:\Python27;C:\Python27\Scripts;C:\Python27\python.exe;;C:\WINDOWS\System32\OpenSSH;C:\Program Files\nodejs;C:\ProgramData\chocolatey\bin;C:\Users\Ned\AppData\Local\Microsoft\WindowsApps;C:\Users\Ned\AppData\Local\GitHubDesktop\bin;C:\Users\Ned\AppData\Roaming\npm
9 verbose lifecycle nvidia-snatcher@1.5.0test:notification: CWD: C:\Users\Ned\Documents\GitHub\nvidia-snatcher
10 silly lifecycle nvidia-snatcher@1.5.0
test:notification: Args: [
10 silly lifecycle '/d /s /c',
10 silly lifecycle 'npm run build && node build/test/notification-test.js'
10 silly lifecycle ]
11 silly lifecycle nvidia-snatcher@1.5.0test:notification: Returned: code: 1 signal: null
12 info lifecycle nvidia-snatcher@1.5.0
test:notification: Failed to exec test:notification script
13 verbose stack Error: nvidia-snatcher@1.5.0 test:notification: npm run build && node build/__test__/notification-test.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid nvidia-snatcher@1.5.0
15 verbose cwd C:\Users\Ned\Documents\GitHub\nvidia-snatcher
16 verbose Windows_NT 10.0.19041
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "test:notification"
18 verbose node v12.19.0
19 verbose npm v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error nvidia-snatcher@1.5.0 test:notification: npm run build && node build/__test__/notification-test.js
22 error Exit status 1
23 error Failed at the nvidia-snatcher@1.5.0 test:notification script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@gladroger
Copy link

Can confirm this bug with Centos as well.

0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'test:notification' ] 2 info using npm@6.14.4 3 info using node@v10.21.0 4 verbose run-script [ 'pretest:notification', 4 verbose run-script 'test:notification', 4 verbose run-script 'posttest:notification' ] 5 info lifecycle nvidia-snatcher@1.5.0~pretest:notification: nvidia-snatcher@1.5.0 6 info lifecycle nvidia-snatcher@1.5.0~test:notification: nvidia-snatcher@1.5.0 7 verbose lifecycle nvidia-snatcher@1.5.0~test:notification: unsafe-perm in lifecycle true 8 verbose lifecycle nvidia-snatcher@1.5.0~test:notification: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/roger/nvidia-snatcher/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin 9 verbose lifecycle nvidia-snatcher@1.5.0~test:notification: CWD: /home/roger/nvidia-snatcher 10 silly lifecycle nvidia-snatcher@1.5.0~test:notification: Args: [ '-c', 10 silly lifecycle 'npm run build && node build/__test__/notification-test.js' ] 11 silly lifecycle nvidia-snatcher@1.5.0~test:notification: Returned: code: 1 signal: null 12 info lifecycle nvidia-snatcher@1.5.0~test:notification: Failed to exec test:notification script 13 verbose stack Error: nvidia-snatcher@1.5.0 test:notification: npm run build && node build/test/notification-test.js13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:198:13) 13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:198:13) 13 verbose stack at maybeClose (internal/child_process.js:982:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) 14 verbose pkgid nvidia-snatcher@1.5.0 15 verbose cwd /home/roger/nvidia-snatcher 16 verbose Linux 4.18.0-193.19.1.el8_2.x86_64 17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "test:notification" 18 verbose node v10.21.0 19 verbose npm v6.14.4 20 error code ELIFECYCLE 21 error errno 1 22 error nvidia-snatcher@1.5.0 test:notification:npm run build && node build/test/notification-test.js22 error Exit status 1 23 error Failed at the nvidia-snatcher@1.5.0 test:notification script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

@AimanJaouhar
Copy link

Take these two imports in Notification.ts

import {playSound} from './sound';
import {sendDesktopNotification} from './desktop';

And swap them :

import {sendDesktopNotification} from './desktop';
import {playSound} from './sound';

Then rebuild and run.
This seems to be a circular dependency issue between config and logger. Importing logger before importing config (and thus sendDesktopNotification before playSound) fixes the error.

@UziKhana
Copy link

UziKhana commented Oct 7, 2020

Take these two imports in Notification.ts

import {playSound} from './sound';
import {sendDesktopNotification} from './desktop';

And swap them :

import {sendDesktopNotification} from './desktop';
import {playSound} from './sound';

Then rebuild and run.
This seems to be a circular dependency issue between config and logger. Importing logger before importing config (and thus sendDesktopNotification before playSound) fixes the error.

Worked

@FilipKAudio
Copy link
Author

Take these two imports in Notification.ts

import {playSound} from './sound';
import {sendDesktopNotification} from './desktop';

And swap them :

import {sendDesktopNotification} from './desktop';
import {playSound} from './sound';

Then rebuild and run.
This seems to be a circular dependency issue between config and logger. Importing logger before importing config (and thus sendDesktopNotification before playSound) fixes the error.

Worked for me! Thank you.

@andrewmackrodt
Copy link
Contributor

Re-opening as this issue is reproduceable and highlights a bug in the code, i.e. the import order mentioned in #468 (comment).

@Smuglur
Copy link

Smuglur commented Oct 7, 2020

I've tried the fix and get the same error and log.

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm@6.14.6
3 info using node@v12.18.4
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle nvidia-snatcher@1.5.0prestart: nvidia-snatcher@1.5.0
6 info lifecycle nvidia-snatcher@1.5.0
start: nvidia-snatcher@1.5.0
7 verbose lifecycle nvidia-snatcher@1.5.0start: unsafe-perm in lifecycle true
8 verbose lifecycle nvidia-snatcher@1.5.0
start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\herpd\Desktop\nvidia-snatcher-main\node_modules.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Razer\ChromaBroadcast\bin;C:\Program Files\Razer\ChromaBroadcast\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Users\herpd\AppData\Local\Programs\Python\Python38-32\Scripts;C:\Users\herpd\AppData\Local\Programs\Python\Python38-32;C:\Users\herpd\AppData\Local\Microsoft\WindowsApps;C:\Users\herpd\AppData\Roaming\npm
9 verbose lifecycle nvidia-snatcher@1.5.0start: CWD: C:\Users\herpd\Desktop\nvidia-snatcher-main
10 silly lifecycle nvidia-snatcher@1.5.0
start: Args: [ '/d /s /c', 'npm run build && node build/index.js' ]
11 silly lifecycle nvidia-snatcher@1.5.0start: Returned: code: 1 signal: null
12 info lifecycle nvidia-snatcher@1.5.0
start: Failed to exec start script
13 verbose stack Error: nvidia-snatcher@1.5.0 start: npm run build && node build/index.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid nvidia-snatcher@1.5.0
15 verbose cwd C:\Users\herpd\Desktop\nvidia-snatcher-main
16 verbose Windows_NT 10.0.18362
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "start"
18 verbose node v12.18.4
19 verbose npm v6.14.6
20 error code ELIFECYCLE
21 error errno 1
22 error nvidia-snatcher@1.5.0 start: npm run build && node build/index.js
22 error Exit status 1
23 error Failed at the nvidia-snatcher@1.5.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@mckay17
Copy link
Contributor

mckay17 commented Oct 7, 2020

same problem here, notification test dont work... :(

@ibowline
Copy link

ibowline commented Oct 7, 2020

If you are still having issues. After you swap the two lines of code... fix your permissions with sudo chown -R $USERNAME /home/$USERNAME

@mckay17
Copy link
Contributor

mckay17 commented Oct 7, 2020

sorry i have nooo idea how this works.. i wait for a fix, hope its there soon ^^

@UziKhana
Copy link

UziKhana commented Oct 8, 2020

sorry i have nooo idea how this works.. i wait for a fix, hope its there soon ^^

this means to change order of the lines, line with sendDesktopNotification should be before line containing playSound

to rebuild use nom install command, it worked for me with a rebuild but am no expert to say that is right

@NitrousX
Copy link

NitrousX commented Oct 8, 2020

I'm getting similar results, does the field play sound need to be in the .nvc file ? All I want to is just a email notification

This is what i get:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'test:notification'
1 verbose cli ]
2 info using npm@6.14.8
3 info using node@v14.13.0
4 verbose run-script [
4 verbose run-script 'pretest:notification',
4 verbose run-script 'test:notification',
4 verbose run-script 'posttest:notification'
4 verbose run-script ]
5 info lifecycle nvidia-snatcher@1.5.0pretest:notification: nvidia-snatcher@1.5.0
6 info lifecycle nvidia-snatcher@1.5.0
test:notification: nvidia-snatcher@1.5.0
7 verbose lifecycle nvidia-snatcher@1.5.0test:notification: unsafe-perm in lifecycle true
8 verbose lifecycle nvidia-snatcher@1.5.0
test:notification: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\NitrousX\desktop\nvidia-snatcher\node_modules.bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Users\NitrousX\scoop\shims;C:\Users\NitrousX\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Users\NitrousX\AppData\Local\Microsoft\WindowsApps;C:\Users\NitrousX\AppData\Roaming\npm
9 verbose lifecycle nvidia-snatcher@1.5.0test:notification: CWD: C:\Users\NitrousX\desktop\nvidia-snatcher
10 silly lifecycle nvidia-snatcher@1.5.0
test:notification: Args: [
10 silly lifecycle '/d /s /c',
10 silly lifecycle 'npm run build && node build/test/notification-test.js'
10 silly lifecycle ]
11 silly lifecycle nvidia-snatcher@1.5.0test:notification: Returned: code: 1 signal: null
12 info lifecycle nvidia-snatcher@1.5.0
test:notification: Failed to exec test:notification script
13 verbose stack Error: nvidia-snatcher@1.5.0 test:notification: npm run build && node build/__test__/notification-test.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1047:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid nvidia-snatcher@1.5.0
15 verbose cwd C:\Users\NitrousX\desktop\nvidia-snatcher
16 verbose Windows_NT 10.0.19041
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "test:notification"
18 verbose node v14.13.0
19 verbose npm v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error nvidia-snatcher@1.5.0 test:notification: npm run build && node build/__test__/notification-test.js
22 error Exit status 1
23 error Failed at the nvidia-snatcher@1.5.0 test:notification script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@Smuglur
Copy link

Smuglur commented Oct 8, 2020

I figured out what was causing my problem, I was trying to reuse my edited env. file from the last update, as soon as I edited the new env. example it started working again.

@Rusna
Copy link

Rusna commented Oct 8, 2020

I'm experiencing same issues. With Raspbian and Raspberry Pi 32bit. Please advise.

cat /home/pi/.npm/_logs/2020-10-08T19_16_48_468Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'test:notification' ]
2 info using npm@6.14.8
3 info using node@v14.13.1
4 verbose run-script [
4 verbose run-script 'pretest:notification',
4 verbose run-script 'test:notification',
4 verbose run-script 'posttest:notification'
4 verbose run-script ]
5 info lifecycle nvidia-snatcher@1.5.0pretest:notification: nvidia-snatcher@1.5.0
6 info lifecycle nvidia-snatcher@1.5.0
test:notification: nvidia-snatcher@1.5.0
7 verbose lifecycle nvidia-snatcher@1.5.0test:notification: unsafe-perm in lifecycle true
8 verbose lifecycle nvidia-snatcher@1.5.0
test:notification: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pi/nvidia-snatcher/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
9 verbose lifecycle nvidia-snatcher@1.5.0test:notification: CWD: /home/pi/nvidia-snatcher
10 silly lifecycle nvidia-snatcher@1.5.0
test:notification: Args: [ '-c', 'npm run build && node build/test/notification-test.js' ]
11 silly lifecycle nvidia-snatcher@1.5.0test:notification: Returned: code: 1 signal: null
12 info lifecycle nvidia-snatcher@1.5.0
test:notification: Failed to exec test:notification script
13 verbose stack Error: nvidia-snatcher@1.5.0 test:notification: npm run build && node build/__test__/notification-test.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1047:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid nvidia-snatcher@1.5.0
15 verbose cwd /home/pi/nvidia-snatcher
16 verbose Linux 5.4.51-v7+
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "test:notification"
18 verbose node v14.13.1
19 verbose npm v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error nvidia-snatcher@1.5.0 test:notification: npm run build && node build/__test__/notification-test.js
22 error Exit status 1
23 error Failed at the nvidia-snatcher@1.5.0 test:notification script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@Rusna
Copy link

Rusna commented Oct 9, 2020

This resolved: #468 (comment)

@coolts
Copy link

coolts commented Oct 9, 2020

Take these two imports in Notification.ts

import {playSound} from './sound';
import {sendDesktopNotification} from './desktop';

And swap them :

import {sendDesktopNotification} from './desktop';
import {playSound} from './sound';

Then rebuild and run.
This seems to be a circular dependency issue between config and logger. Importing logger before importing config (and thus sendDesktopNotification before playSound) fixes the error.

How do i "rebuild and run"? git newbie here.

fsckin added a commit to fsckin/nvidia-snatcher that referenced this issue Oct 9, 2020
Repository owner locked and limited conversation to collaborators Oct 9, 2020
@jef
Copy link
Owner

jef commented Oct 9, 2020

Everyone is repeating the same issue over and over and isn't providing any more value than the former. It seems we know the issue now and will get a fix out as soon as possible. Thank you all for your help!

@jef jef closed this as completed in ed970fc Oct 9, 2020
Repository owner unlocked this conversation Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests