Solved issue with npm
-
hello everyone i have this issue with npm command i try to install google assistant i tryed to install and uninstal nodejs a lot of time created project on google console and claud download credentials but when i do this command it gives me this error enyone know hat that is? or how to fix?
pi@raspberrypi:~ $ cd MagicMirror pi@raspberrypi:~/MagicMirror $ cd modules pi@raspberrypi:~/MagicMirror/modules $ npm run tokens npm ERR! Missing script: "tokens" npm ERR! npm ERR! Did you mean this? npm ERR! npm token # Manage your authentication tokens npm ERR! npm ERR! To see a list of scripts, run: npm ERR! npm run npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2022-03-27T14_44_59_491Z-debug-0.log pi@raspberrypi:~/MagicMirror/modules $
-
hello, obviously it does not work, you do not launch the command in the right folder.
be careful that it must be done directly on the mirror, not in ssh.
see wiki
https://wiki.bugsounet.fr/en/MMM-GoogleAssistantv4/Beforethefirststart -
@bigjojo hello thank you for response but it does not appear on mirror
-
So try with a terminal in your pi or with vncviewer
-
@bugsounet but it was terminal i get this error in terminal
-
Past the error?
-
@zeangkor said in issue with npm:
pi@raspberrypi:~ $ cd MagicMirror pi@raspberrypi:~/MagicMirror $ cd modules pi@raspberrypi:~/MagicMirror/modules $ npm run tokens npm ERR! Missing script: "tokens" npm ERR! npm ERR! Did you mean this? npm ERR! npm token # Manage your authentication tokens npm ERR! npm ERR! To see a list of scripts, run: npm ERR! npm run npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2022-03-27T14_44_59_491Z-debug-0.log pi@raspberrypi:~/MagicMirror/modules $
now if you want to says this error …
@bigjojo ask you to read this wiki partFor no syntax error… clic on copy (like my cursor) and past content in a terminal
The result will be different like yours
BUT I warn you !
When i see your final commandnpm run tokens
it’s an MMM-GoogleAssistant v3 commandMMM-GoogleAssistant is now in v4 !
It’s better for read not reading/seeing an YouTube tutorial but reading an colored Wiki
why ?
because with a YouTube Tutorial: it will never works -
@bugsounet nope still not working i tryed everything what os on wiki step by step nothing is working
-
Waiting for log so?
-
Actually script is
npm run token
As Bugsounet said, MMM-GoogleAssistant is now in v4 -
still get this error
pi@raspberrypi:~/MagicMirror/modules/MMM-GoogleAssistant $ npm run token
MMM-GoogleAssistant@4.0.2 token
installer/token.shWelcome to MMM-GoogleAssistant Token generator!
Do you want to install/reinstall MMM-GoogleAssistant token? [Y/n]
Your choice: yError: Bad credentials missing: redirect_uris
Done.
-
This error is related with a YouTube tutorial…
So Create credentials with the wiki(see Credentials setup)
-
@bugsounet okay it worked i will buy you a beer that’s for sure but it does not recognize voice i mean nothing really happening when i say hey google or hey jarvis my mic is working sorry for bothering you and take your time but im totaly new
-
Wiki says need to install:
- MMM-GoogleAssistant
- Gateway
- EXT-Detector
- EXT-Alert
Right?
-
@bugsounet now i have snowboy library issue it cant load
-
without logs … I can’t help
-
@bugsounet ```
[ERROR] [DETECTOR] Warning: 1 @bugsounet library not loaded !
[29.03.2022 17:36.47.107] [ERROR] [DETECTOR] Try to solve it withnpm run rebuild
in EXT-Detector directory
[29.03.2022 17:36.47.118] [ERROR] [DETECTOR] No detector initialized!
[29.03.2022 17:36.47.122] [INFO] Checking git for module: EXT-Detector
[29.03.2022 17:36.47.216] [INFO] Checking git for module: EXT-Alert
[29.03.2022 17:36.47.298] [INFO] Checking git for module: Gateway
[29.03.2022 17:36.47.366] [INFO] Checking git for module: MMM-Remote-Control
[29.03.2022 17:36.47.455] [INFO] Checking git for module: default
[29.03.2022 17:36.48.294] [INFO] Newsfeed-Fetcher: Broadcasting 25 items.
[29.03.2022 17:36.49.330] [INFO] Calendar-Fetcher: Broadcasting 10 events.
[29.03.2022 17:36.49.827] [INFO] Newsfeed-Fetcher: Broadcasting 57 items. -
@bugsounet here is a code what i use ```
{
module: “MMM-GoogleAssistant”,
position: “top_left”,
configDeepMerge: true,
classes: ‘always’,
config: {
Extented: {
youtube: {
useYoutube: true,
youtubeCommand: “youtube”,
displayResponse: true,
useVLC: true,
minVolume: 30,
maxVolume: 100,
username: “my forum username”,
token: null
},
spotify: {
useSpotify: true,
visual: {
updateInterval: 1000,
idleInterval: 10000,
useBottombar: true,
CLIENT_ID: “[your clientID]”,
CLIENT_SECRET: “[your clientSecret]”
},
player: {
type: “Raspotify”,
email: “”,
password:“”,
minVolume: 10,
maxVolume: 90,
usePause: true
}} }, assistantConfig: { latitude: 51.508530, longitude: -0.076132, }, } },
{
module: “EXT-Detector”,
position: “top_left”,
configDeepMerge: true,
config: {
debug: false,
detectors: [
{
detector: “Snowboy”,
Model: “jarvis”,
Sensitivity: null
}
]
}
},
{
module: ‘EXT-Alert’,
config: {
debug: false,
ignore: []
}
},
{
module: ‘Gateway’
}, -
Can you try
npm run rebuild
inside EXT-Detector directory ?and verify if
✔ MagicMirror Rebuild Complete
on the end process -
sorry to barge in but you mentioned your MIC is functional did you try this to see if you have sound output https://developers.google.com/assistant/sdk/guides/service/python/embed/audio ?.. just throwing this out there…as well not sure if this could be an issue but /home/pi/.asoundrc is deleted when loading to PIdesktop…do you have your MIC info in there? again disregard if done already…good day