muxinc / strapi-plugin-mux-video-uploader

A Strapi plugin for managing uploads to Mux.
https://mux.com
24 stars 19 forks source link

install fails using strapi 3.5.x #6

Closed LouisMarzorati closed 3 years ago

LouisMarzorati commented 3 years ago

strapi-plugin-mux-video-uploader@1.1.0 postinstall /Users/example-path/node_modules/strapi-plugin-mux-video-uploader tsc

controllers/mux.ts:85:62 - error TS2345: Argument of type 'string | string[]' is not assignable to parameter of type 'string'. Type 'string[]' is not assignable to type 'string'.

85 isSigValid = Webhooks.verifyHeader(JSON.stringify(body), sig, config.webhook_signing_secret);


Found 1 error.

npm WARN @buffetjs/utils@3.3.4 requires a peer of yup@^0.27.0 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap@4.6.0 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! strapi-plugin-mux-video-uploader@1.1.0 postinstall: `tsc`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the strapi-plugin-mux-video-uploader@1.1.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
LouisMarzorati commented 3 years ago

Also fails with strapi 3.5.1 Assuming it's an issue introduced in 3.5, will try rolling back to previous versions until I am able to install it.

bram-abe commented 3 years ago

I got same issues with strapi 3.5.3 everytime try to install dependencies from package.json

controllers/mux.ts:85:62 - error TS2345: Argument of type 'string | string[]' is not assignable to parameter of type 'string'. Type 'string[]' is not assignable to type 'string'. 85 isSigValid = Webhooks.verifyHeader(JSON.stringify(body), sig, config.webhook_signing_secret);

npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! strapi-plugin-mux-video-uploader@1.1.0 postinstall: tsc npm ERR! npm ERR! Failed at the strapi-plugin-mux-video-uploader@1.1.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Have you found the problem @LouisMarzorati ?

bram-abe commented 3 years ago

btw I found the log in terminal when I do "npm i strapi-plugin-mux-video-uploader" it still downloaded strapi-plugin-mux-video-uploader@1.1.0 , not the latest version 1.1.1. if I change strapi-plugin-mux-video-uploader in package.json to 1.1.1 then I got an error below:

npm ERR! code ETARGET npm ERR! notarget No matching version found for strapi-plugin-mux-video-uploader@1.1.1. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist.

hai @erikpena waiting for your answer. thx

LouisMarzorati commented 3 years ago

Nope, I was not able to find the problem. Due to time constraints on the project I'm working on, I ended up using another provider (cloudinary)

bram-abe commented 3 years ago

FYI: try force install will ignore this error and the plugins seems work fine in production.

LouisMarzorati commented 3 years ago

FYI: try force install will ignore this error and the plugins seems work fine in production.

what’s the install command you used

bram-abe commented 3 years ago

FYI: try force install will ignore this error and the plugins seems work fine in production.

what’s the install command you used

npm i -f

LouisMarzorati commented 3 years ago

Yes, it does install with force. No, it does not work. It creates the MuxAsset content-type, but you can not configure because the menu does not appear in strapi as shown here.

https://docs.mux.com/guides/video/integrate-with-strapi#4-setup-configuration-in-strapi

LouisMarzorati commented 3 years ago

I ended up just writing everything out custom. My own MuxAsset content-type. Using Mux's node sdk, posting a new stream request via axois (s3 stored video) updating strapi MuxAsset with asset_id/playback_id..ext. setting a isPlayable bool to false. then a setup a webhook to notify another nodejs function I created when its ready, which just flips the isPlayable strapi bool.

Not worth my time waiting on support eh, but thanks for the tips (--:

bram-abe commented 3 years ago

I ended up just writing everything out custom. My own MuxAsset content-type. Using Mux's node sdk, posting a new stream request via axois (s3 stored video) updating strapi MuxAsset with asset_id/playback_id..ext. setting a isPlayable bool to false. then a setup a webhook to notify another nodejs function I created when its ready, which just flips the isPlayable strapi bool.

are you build the another nodejs function as independent micro apps from strapi or you build that function as strapi plugins ?

Yes, it does install with force. No, it does not work. It creates the MuxAsset content-type, but you can not configure because the menu does not appear in strapi as shown here.

https://docs.mux.com/guides/video/integrate-with-strapi#4-setup-configuration-in-strapi

It's weird, npm i package-name -f works fine for me in production

iplanwebsites commented 3 years ago

Also stuck here on the cryptic Exit code: 2error upon install (for both version 1.1.0 on NPM and the latest 1.1.1 on github).

erikpena commented 3 years ago

Hello @iplanwebsites @LouisMarzorati and @bram-abe, thank you all for letting us know of the above as well as trying to assist each other 😄.

We have a fix in a PR for addressing the Webhooks issues (https://github.com/muxinc/strapi-plugin-mux-video-uploader/pull/10). There is another issue that is popping up that seems to be related to how Strapi handles the plugin. We're seeking to work with the Strapi team to see if we can understand and address the issue.

erikpena commented 3 years ago

Great news @iplanwebsites, @LouisMarzorati and @bram-abe— we were able to resolve issues from the latest version of Strapi (3.6.2). We're running through a last bit of testing and we're hoping to release it tomorrow. Thank you all for your patience on this!

LouisMarzorati commented 3 years ago

Great news @iplanwebsites, @LouisMarzorati and @bram-abe— we were able to resolve issues from the latest version of Strapi (3.6.2). We're running through a last bit of testing and we're hoping to release it tomorrow. Thank you all for your patience on this!

amazing!! thank you so much, this is a huge help.

erikpena commented 3 years ago

Of course! We are testing one more thing (upgrade path from 3.3.3 to 3.6.2) and we'll be cutting that build. Again, thank you for your patience on this :)

erikpena commented 3 years ago

Hello @iplanwebsites, @LouisMarzorati and @bram-abe, we just created a release for 1.2.0 that should address this—

https://github.com/muxinc/strapi-plugin-mux-video-uploader/releases/tag/v1.2.0

I'm going to be closing this issue. Thank you!