Closed DrYoatGitHub closed 7 months ago
Thank you for the appreciation :slightly_smiling_face: and for taking the time to open an issue here!
Unfortunately, I cannot reproduce the error on my system. When exactly does it occur? When you run git pull
? Or with npm install --omit=dev
?
Please delete the node_modules
directory and the package-lock.json
file in the module directory and then run git pull
and npm install --omit=dev
again? If this isn't working, try npm install
.
The results would be interesting because the problem may also occur with other users.
just created a GitHub account
It would be nice if you could give the modules you like a star, it's a small but nice gesture to the developers :slightly_smiling_face: The stars have recently been added to the new module list I am working on.
Star awarded 👍
The error occurs with npm install --omit=dev
and is reproducible today.
Deleted node_modules
directory and package-lock.json
file, pulled from git and installed again => same error
Then tried the npm install
=> runs perfectly through 👍 😄
Thanks for your support!
Okay, thanks for the feedback! I have just adjusted the README accordingly :slightly_smiling_face:
Hey,
i have the same issue, it appears on all three NMP commands with freshly pulled git.
All cause the same issue: }
mmm-publictransporthafas@2.1.0 prepare husky
file:///var/lib/docker/volumes/magicmirror_modules/_data/MMM-PublicTransportHafas/node_modules/husky/bin.mjs:14 ;(o.scripts ||= {}).prepare = 'husky' ^
SyntaxError: Unexpected token '=' at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18) at async link (internal/modules/esm/module_job.js:42:21) npm ERR! code 1 npm ERR! path /var/lib/docker/volumes/magicmirror_modules/_data/MMM-PublicTransportHafas npm ERR! command failed npm ERR! command sh -c husky
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2024-03-30T23_25_59_648Z-debug-0.log
Can you please check what might be the issue?
Thanks for your help!
Please try this as a quick solution:
npm install husky
npm ci
I will look into it later to find a proper solution.
Thanks for the lighting fast answer.
unfortunately, still nothing new. The issue persists, even when installing husky before Appreciate the help! :)
Okay, I just changed something.
Please try this in the directory of the module:
git pull
npm ci
If that doesn't work. Delete the module directory and reinstall it.
Hey I just removed the folder and pulled it again and run npm ci. Now it works. Thanks! :)
Nice that you were able to solve it.
First of all I would like to thank you for maintaining this module - really awesome! It was the first module which I integrated in my MagicMirror during Christmas time :-) Up to now never had any problems with the updates of the module - until today... Getting the following error message:
sh: 1: husky: not found npm ERR! code 127 npm ERR! path /home/my_pi_user/MagicMirror/modules/MMM-PublicTransportHafas npm ERR! command failed npm ERR! command sh -c husky
npm ERR! A complete log of this run can be found in: /home/my_pi_user/.npm/_logs/2024-02-04T11_09_41_774Z-debug-0.log
Nevertheless the module is running fine... As I'm a newbie in this stuff (just created a GitHub account...) would appreciate advice. Many Thanks and have a nice weekend! Dr. Yo