1

I'm trying to install Tawk.to chat in my Magento 2.1.9 shopping site hosted on a cPanel shared server environment. And I downloaded the extension files following the guidelines are given here:

https://www.tawk.to/knowledgebase/plugins-and-modules/magento-2-integration/

After extracting and copying the files to the root directory of my website, I requested my web host to run the needed command lines. After that my site went blank, and I when I inquired from the hosting provider, I was informed that the process was halted, because of an error message that displayed:

===========================================

[root@sixteen public_html]# php composer.phar require tawk/widget

Authentication required (repo.magento.com):
  Username:  my_magento_public_key
  Password: my_magento_private_key

Do you want to store credentials for repo.magento.com in /root/.composer/auth.json ? [Yn] y

[InvalidArgumentException]
Could not find package tawk/widget at any version for your minimum-stability (alpha). Check the package spelling or your minimum-stability

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

==========================================

I learned from online resources that the issue might be in composer.json file. Some tutorials suggest setting minimum stability to -dev. But my composer.json file doesn't even have minimum stability setting, as shown in the code below:

{
  "name": "tawk/widget",
  "description": "Tawk live chat widget",
  "type": "magento2-module",
  "version": "1.0.0",
  "license": [
    "OSL-3.0"
  ],
  "require": {
    "php": "~5.6.0|7.0.2|7.0.4|~7.0.12"
  },
  "autoload": {
    "files": [ "registration.php" ],
    "psr-4": {
      "Tawk\\Widget\\": ""
    }
  }
}

This article suggests setting minimum stability and using stability flags:

http://webtips.krajee.com/setting-composer-minimum-stability-application/

and this article too:

https://igor.io/2013/02/07/composer-stability-flags.html

Does anyone know how to put it all together in my composer.json, to fix this minimum stability error?

Thanks for your time and insight in advance.

0

I think there is not an issue with composer file, Please run these commands after installing the extension from your root folder

php bin/magento setup:upgrade php bin/magento

setup:static-content:deploy php

bin/magento cache:flush

chmod -R 777 var pub

Because we need to enable php bin/magento module:enable Tawk_Widget command enable extension, and chmod -R 777 var pub will change folder permission to 777.

Please let me know if I was able to answer your questions.

  • Thanks for the insight. I've sent a support ticket to my hosting provider to run the commands you posted. And I will post an update, when I get response from them. – Justin Nov 10 '17 at 11:02
  • A million thanks - my website is back online, after showing a blank page for more than a week. But there remain some minor issues: CSS formatting and product images don't display well in the frontend. I've also noticed that there are no icons or working Javascript in both the frontend and the backend. Any idea how to fix that? Be advised that this won't work, as I have done that sometime ago: In "app/etc/di.xml find the path “Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink” and replace to Magento\Framework\App\View\Asset\MaterializationStrategy\Copy" – Justin Nov 10 '17 at 18:15
0

If you are facing issue with composer, download zip file from here.

Paste it to app/code and run the following commands:

php bin/magento module:enable Tawk_Widget
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento cache:clean

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.