twilio-labs / plugin-serverless

Twilio CLI plugin to work with Serverless
MIT License
21 stars 14 forks source link

Unable to install plugins using Twilio CLI in Nodejs #41

Closed Arpanks29 closed 3 years ago

Arpanks29 commented 3 years ago

Issue Summary Twilio CLI throwing an error stating local certiifcate in not found. I even installed certificate , still same error occurs.

Code Snippet twilio plugins:install @twilio-labs/plugin-serverless

paste code here

Exception/Log

error An unexpected error occurred: "https://registry.yarnpkg.com/@twilio-labs%2fplugin-serverless: unable to get local issuer certificate". Installing plugin @twilio-labs/plugin-serverless... ! Error: yarn add @twilio-labs/plugin-serverless@latest --non-interactive --mutex=file:C:\Users\ARPANSINGH.twilio-cli\yarn.lock --preferred-cache-folder=C:\Users\ARPANSINGH.twilio-cli\yarn --check-files exited with code 1

welcome[bot] commented 3 years ago

Thank you so much for opening your first issue for this project! We'll try to get back to it as quickly as possible. While you are waiting...here's a random picture of a corgi (powered by dog.ceo)

picture of dog

philnash commented 3 years ago

Sorry to bounce you around various projects, but I believe this is going to have something to do with the Twilio CLI itself, not the serverless plugin.

Could you raise this with https://github.com/twilio/twilio-cli.

Also, with certificate errors like this the issue may be in your network. Are you behind a corporate firewall or VPN when you try to install the plugin?

adamchasetaylor commented 3 years ago

@Arpanks29

Can you set the following environment variable prior to running the command to install the plugin?

set NODE_OPTIONS=--use-openssl-ca

This tells the Twilio CLI to use your operating systems certs instead of the default NodeJS certs.

Arpanks29 commented 3 years ago

Tried doing this, still same issue.

On Tue, 27 Oct 2020, 4:06 am Adam, notifications@github.com wrote:

@Arpanks29 https://github.com/Arpanks29

Can you set the following environment variable prior to running the command to install the plugin?

set NODE_OPTIONS=--use-openssl-ca

This tells the Twilio CLI to use your operating systems certs instead of the default NodeJS certs.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/twilio-labs/plugin-serverless/issues/41#issuecomment-716861538, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJRCYA7CU7RLFGGT6654BPLSMX2X3ANCNFSM4S2WEJ2A .

philnash commented 3 years ago

This is being dealt with directly by @adamchasetaylor (and I still think it's an issue somewhere in the main CLI rather than this plugin), so I'm going to close this for now.

dkundel commented 3 years ago

Just following up on this. The problem is inside the OClif Plugins Plugin that we are using (for example Salesforce has the same issue). @childish-sambino from our Twilio CLI team opened an issue with them that you can follow here: https://github.com/oclif/plugin-plugins/issues/189

In the meantime a work around should be to delete the yarn.lock file inside the .twilio-cli directory inside your home directory. So in your case: C:\Users\ARPANSINGH\.twilio-cli\yarn.lock and try again.

childish-sambino commented 3 years ago

Also need to delete the yarn.lock.lock folder there.

EndsofttechWebSolutions commented 2 years ago

I have deleted manually yarn.lock.lock when I tried the again the command twilio plugins:install @twilio-labs/plugin-serverless again yarn.lock.lock recreated. tried it 3x no luck.

issue facing see below Installing plugin @twilio-labs/plugin-serverless... failed Error: yarn add @twilio-labs/plugin-serverless@latest --non-interactive --mutex=file:C:\Users\user.twilio-cli\yarn.lock --preferred-cache-folder=C:\Users\user.twilio-cli\yarn --check-files exited with code 1

MgHtinLynn commented 2 years ago
philnash commented 2 years ago

Hi @MgHtinLynn, are you finding this an issue too? Have you tried the workarounds mentioned above?

MgHtinLynn commented 2 years ago

hi @philnash I tried that way but didn't work till now.

philnash commented 2 years ago

@MgHtinLynn as this is an old issue that you are commenting on, could I ask you to please fully describe what you are doing and the error that you are getting? Thank you.

MgHtinLynn commented 2 years ago

Hi @philnash Thanks for your information and support.

Currently, I'm trying to integrate for non-native CRM to Twilio Flex

According to docs, I need to create new plugin with react. So i tried to install twilio-cli v2 with node - v14 I'm trying to install twilio plugins:install @twilio-labs/plugin-flex but getting this error

Installing plugin @twilio-labs/plugin-flex... failed
    Error: yarn add @twilio-labs/plugin-flex@latest --non-interactive --mutex=file:/Users/htinlynn/.twilio-cli/yarn.lock
    --preferred-cache-folder=/Users/htinlynn/.twilio-cli/yarn --check-files exited with code 1

My Environment

Do you have any idea or any solutions to fix it?

philnash commented 2 years ago

Hey @MgHtinLynn, thanks for the extra information. It turns out that this is not the right repo to report this issue to.

This repo is for the Twilio Serverless toolkit and Serverless plugin, but you are trying to install the Flex plugin. You can find the flex plugin as part of the monorepo here: https://github.com/twilio/flex-plugin-builder. I recommend you open a new issue there with as much information about what is going on.