Supergiovane / node-red-contrib-tts-ultimate

This node transforms a text into a speech audio. You can hear the voice natively through Sonos or external players.
MIT License
22 stars 5 forks source link

Couldn't update - Can't reinstall due to npm-force-resolutions #63

Closed DennisGaida closed 11 months ago

DennisGaida commented 1 year ago

Hello there good person!

Describe the bug On Node-Red 3.0.2 I wanted to update ttsultimate from 1.0.20 to 1.0.50. Updates always failed (though other modules updated just fine) - I thought the best way would be to remove ttsultimate and reinstall. I did just that, and now I get the error:

2022-09-01T09:08:32.633Z Install : node-red-contrib-tts-ultimate 1.0.50

2022-09-01T09:08:32.851Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-tts-ultimate@1.0.50
2022-09-01T09:08:34.733Z [err] npm
2022-09-01T09:08:34.735Z [err]  
2022-09-01T09:08:34.736Z [err] WARN
2022-09-01T09:08:34.736Z [err]  
2022-09-01T09:08:34.736Z [err] config
2022-09-01T09:08:34.737Z [err]  production Use `--omit=dev` instead.
2022-09-01T09:08:54.910Z [err] npm
2022-09-01T09:08:54.911Z [err]  
2022-09-01T09:08:54.911Z [err] WARN
2022-09-01T09:08:54.911Z [err]  
2022-09-01T09:08:54.912Z [err] deprecated
2022-09-01T09:08:54.912Z [err]  formidable@1.2.2: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
2022-09-01T09:08:55.051Z [err] npm WARN
2022-09-01T09:08:55.051Z [err]  deprecated uuid@3.3.2: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
2022-09-01T09:10:22.090Z [err] npm ERR! code
2022-09-01T09:10:22.090Z [err]  127
2022-09-01T09:10:22.090Z [err] npm ERR! path /data/node_modules/microsoft-cognitiveservices-speech-sdk
2022-09-01T09:10:22.104Z [err] npm ERR! command failed
2022-09-01T09:10:22.104Z [err] npm ERR! command sh -c npm install --package-lock-only --ignore-scripts --no-audit && npx npm-force-resolutions
2022-09-01T09:10:22.104Z [err] npm ERR! up to date in 58s
2022-09-01T09:10:22.104Z [err] npm ERR! 
2022-09-01T09:10:22.104Z [err] npm ERR! 104 packages are looking for funding
2022-09-01T09:10:22.104Z [err] npm 
2022-09-01T09:10:22.105Z [err] ERR!   run `npm fund` for details
2022-09-01T09:10:22.105Z [err] npm ERR!
2022-09-01T09:10:22.106Z [err]  sh: npm-force-resolutions: not found
2022-09-01T09:10:22.125Z [err] 
2022-09-01T09:10:22.125Z [err] npm ERR! A complete log of this run can be found in:
2022-09-01T09:10:22.125Z [err] npm ERR!     /data/.npm/_logs/2022-09-01T09_08_34_583Z-debug-0.log
2022-09-01T09:10:22.343Z rc=127

I see that npm-force-resolutions seems to be the problem, I just don't know how to go about this given that multiple other modules could be easily updated.

To Reproduce I'm not sure this is reproducible and possible only my system?

Steps to reproduce the behavior:

  1. Try to update from 1.0.20 to 1.0.50
  2. Receive errors
  3. Uninstall ttsultimate completely
  4. Install ttsultimate
  5. Receive above error

Are you running node-red behind homematic, docker or anything similar?

Supergiovane commented 1 year ago

Hi You've for sure node v18 installed. Please revert to node 16. Node 18 is not supported because, as stated in the README page on github, Microsoft Voice does not support node 18 jet.

DennisGaida commented 1 year ago

No, actually I am on 16:

~ $ node -v
v16.16.0
Supergiovane commented 1 year ago

I'm running on node v16.15.0 and it's fine. It's an LTS stable version. Can you try downgrade? In the meantime, i've asked Microsoft to update they SDK packages!

Supergiovane commented 1 year ago

Hi, please try to update node-red-contrib-tts-ultimate to 1.0.51 I've tested with node 16.17.0 ans it works. It still doesn't work with node 18, but i'm not the culprit.

Supergiovane commented 1 year ago

PS: please see here https://github.com/microsoft/cognitive-services-speech-sdk-js/issues/549

DennisGaida commented 1 year ago

Not suggesting you or your library is the culprit, just trying to find a solution and maybe it helps others :-)

Unfortunately same error with 1.0.51 (trying to install fresh):

-----------------------------------------------------------
2022-09-01T13:44:52.711Z Install : node-red-contrib-tts-ultimate 1.0.51

2022-09-01T13:44:52.840Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-tts-ultimate@1.0.51
2022-09-01T13:44:54.667Z [err] npm
2022-09-01T13:44:54.669Z [err]  WARN config
2022-09-01T13:44:54.669Z [err]  production Use `--omit=dev` instead.
2022-09-01T13:45:16.442Z [err] npm
2022-09-01T13:45:16.443Z [err]  WARN deprecated formidable@1.2.2: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
2022-09-01T13:45:16.566Z [err] npm WARN
2022-09-01T13:45:16.566Z [err]  deprecated uuid@3.3.2: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
2022-09-01T13:46:42.754Z [err] npm ERR! code 127
2022-09-01T13:46:42.754Z [err] npm ERR! path /data/node_modules/microsoft-cognitiveservices-speech-sdk
2022-09-01T13:46:42.759Z [err] npm ERR! command failed
2022-09-01T13:46:42.759Z [err] npm ERR! command sh -c npm install --package-lock-only --ignore-scripts --no-audit && npx npm-force-resolutions
2022-09-01T13:46:42.761Z [err] npm ERR! up to date in 60s
2022-09-01T13:46:42.761Z [err] npm ERR! 
2022-09-01T13:46:42.761Z [err] npm ERR! 104 packages are looking for funding
2022-09-01T13:46:42.761Z [err] npm ERR!   run `npm fund` for details
2022-09-01T13:46:42.761Z [err] npm
2022-09-01T13:46:42.761Z [err]  ERR! sh: npm-force-resolutions: not found
2022-09-01T13:46:42.770Z [err] 
2022-09-01T13:46:42.770Z [err] npm ERR! A complete log of this run can be found in:
2022-09-01T13:46:42.770Z [err] npm ERR!
2022-09-01T13:46:42.782Z [err]      /data/.npm/_logs/2022-09-01T13_44_54_540Z-debug-0.log
2022-09-01T13:46:42.873Z rc=127

Right now I'm doing everything from the node-red UI (palettes > update) - maybe better to do it via shell, i.e. different params for npm install such as explained here: https://stackoverflow.com/questions/64605805/npm-force-resolutions-not-working-when-installing-a-new-package or unrelated?

Supergiovane commented 1 year ago

I don't know if force resolution can help. I assume yes. Doing that via GUI or shell, is the same.

I've just installed TTS-Ultimate from scratch on node 16.17.0 and node-red 2.2.2 without issue:

2022-09-01T13:58:43.102Z Install : node-red-contrib-tts-ultimate 1.0.51
2022-09-01T13:58:43.136Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-tts-ultimate@1.0.51
2022-09-01T13:58:43.360Z [err] npm
2022-09-01T13:58:43.360Z [err]  WARN config production Use `--omit=dev` instead.
2022-09-01T13:58:52.710Z [err] npm
2022-09-01T13:58:52.711Z [err]  WARN deprecated formidable@1.2.2: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
2022-09-01T13:59:42.318Z [out] 
2022-09-01T13:59:42.318Z [out] added 110 packages in 59s
2022-09-01T13:59:42.324Z rc=0

I've other 3 machines with node-red 3.x.x and the update process went fine.


2022-09-01T14:02:43.692Z Install : node-red-contrib-tts-ultimate 1.0.51

2022-09-01T14:02:43.774Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-tts-ultimate@1.0.51
2022-09-01T14:04:17.308Z [out] 
2022-09-01T14:04:17.308Z [out] changed 5 packages in 2m
2022-09-01T14:04:17.322Z rc=0

I highly suspect that the manner the docker has installed node-red is the culprit. I always avoid docker, using a VM instead, that give me more control on where and how node-red and node have been installed.