Unable to use rsocket-tcp-client package - rsocket

I would like to enable client my to reconnect to my server in case the server restarts. I am trying thus the following piece of code. The thing is, after adding this line "rsocket-tcp-client": "^0.0.23" to my package.json and after running $npm install && ng update && ng serve I got the following error message :
Error: ./node_modules/rsocket-tcp-client/build/RSocketTcpClient.js
Module not found: Error: Can't resolve 'net' in '/Users/gitter/myproject/node_modules/rsocket-tcp-client/build'
Error: ./node_modules/rsocket-tcp-client/build/RSocketTcpClient.js
Module not found: Error: Can't resolve 'tls' in '/Users/gitter/myproject/node_modules/rsocket-tcp-client/build'
Any help please will be more than welcome.

You need to install tls and net packages as well if you are going to use that sample code.

Related

Nuxt.js - Cannot resolve "#nuxtjs/toast'

I'm using Nuxt to create my frontend application in which I would like to add vue-toasted.
However after installing following the documentation :
yarn add vue-toasted
add '#nuxtjs/toast' to modules into the nuxt.config.js file
The server cannot build due to this error :
ERROR Nuxt error
Error: Cannot resolve "#nuxtjs/toast" from "/front/nuxtjs/toast"
I am running nuxt in a docker container but I already installed depencies succesfully such as bootstrap-vue…
I posted my question on nuxt forum but it seems to be completly dead.
Thanks in advance for your help !
Nevermind, it was a silly mistake on my hand, it was the package #nuxtjs/toast that needed to be installed and not vue-toasted -.-

Internal error when trying to use any composer functionality

I'm using composer in a ZF2 PHP project in Zend Studio 10.6. I recently tried to add a depency to the project, and I received an "internal error". Since then, whenever I try to use any function, I receive the same error:
Error msg
"An internal error occurred during: "Package Details".
For input string: "if (defined('COMPOSER_DEV_WARNING_TIME') && $commandName !== 'self-update' && $commandName !== 'selfupdate' && time() > COMPOSER_DEV_WARNING_TIME""
The search function when I try to add a depency also does no longer find any packages, even though I have a repository installed.
I'm very grateful for any suggestions!
I had the same problem. My solution was to use the composer via the commander.
Make sure you have installed the composer (check by writing "composer -V" in your commander to see your version), then just place your dependency in your composer.json file.
For example:
"require" : {
"php" : ">=5.3.3",
"zendframework/zendframework" : "=2.3.7",
Run the command: "composer update" in your project.
For me this worked.
You can use all composer functions in the commander.
You can find help here if you use Ubuntu: How to install and Use Composer on Ubuntu
I know this is old, but it's a simple fix. This error basically means that ZS/Eclipse cannot find the composer.phar file. Ensure it is referenced properly in your system path, or within the IDE and 'Update Dependencies' will work just fine.

Can't find (nor make) OAuth php class on Dreamhost VPS

I am trying to configure my Dreamhost VPS (running Debian and PHP5.3) to enable a PHP app to use an OAuth service provided by Autodesk, but the apps keeps failing because it can't find the OAuth class.
I installed the liboauth-php package using aptitude, and restarted the Apache server, but I get a "Fatal error: Class 'OAuth' not found" error.
I researched other pages here on stackoverflow that refer to installing OAuth, PECL and Pear and tried various suggestions I found in other threads, but they have each run into other problems.
I expect that I need to add the following declaration to the php.ini file so that the PHP parser can find the OAuth class, and then put the oauth.so file in the proper directory:
[PHP_OAUTH]
extension=oauth.so
Unfortunately I can't find a oauth.so shared object on the system.
So I thought maybe I could build one using PECL, since the aptitude install of liboauth-php package didn't fix this problem. Unfortunately PECL wasn't installed either. I tried "pear pickle" to install the PECL package but this too failed with this error:
PHP Warning: PHP Startup: Unable to load dynamic library '/imagick.so' - /imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
Unable to open package2.xml
When that failed, I tried upgrading pear but it also fails with the same error.
PHP Warning: PHP Startup: Unable to load dynamic library '/imagick.so' - /imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
Unable to open package2.xml
I tried using aptitude to install ndn-php53-imagick, php5-imagick and ndn-phpimagick but the last one failed:
Unpacking ndn-phpimagick (from .../ndn-phpimagick_3.0.1-0_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/ndn-phpimagick_3.0.1-0_amd64.deb (--unpack):
trying to overwrite '/etc/php53/conf.d/imagick.ini', which is also in package ndn-php53-imagick 3.0.1-6
configured to not write apport reports
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/ndn-phpimagick_3.0.1-0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.
How can I get an oauth.so file or otherwise get the OAuth class recognized by the PHP parser?
The Debian package (as you noticed) does not include oauth.so (I'm not sure why, but it is Debian so could be anything), and I have been unable to find a package for it.
http://bquery.com/blog/post/php_oauth_extension_-_debian_squeeze_installation/
So far thats the only answer I have found. Note that the libpcre-dev might be libpcre3-dev (depends on Debian version), and you will need to install php-pear (php5-pear) to get the pecl command, and php5-dev for pecl to actually work (package dependency hell for just one shared lib).
imagick (ImageMagick) is (should be) unrelated to pear, oauth, pickle, and everything else. Its just an image processing package (resize/rotate/edit images).
After its all installed be sure the extension=oauth.so line is in your php.ini for the proper php (cli vs apache vs ...).

I want to use SSH2 with zendframework. Also need steps for installation and configuration with wamp server

I want to use SSH2 with zendframework. Also need steps for installation and configuration with wamp server. PHP function ssh2_connect is not working.
It showing the following error:
Fatal error: Call to undefined function ssh2_connect() in /home/chaosnz/public_html/fotosnap.net/test.php on line 2
How can I deal with this?
Thanks
Run:
/usr/local/zend/bin/pecl install ssh2 channel://pecl.php.net/ssh2-0.12
I was having the same problem. /usr/local/zend/bin/pecl install ssh2 outputs:
Failed to download pecl/ssh2 within preferred state "stable", latest release is version 0.12, stability "beta", use "channel://pecl.php.net/ssh2-0.12" to install
install failed
When I added channel://pecl.php.net/ssh2-0.12 it compiled fine. It will then ask you:
You should add "extension=ssh2.so" to php.ini
I've added that to /usr/local/zend/etc/conf.d/ssh2.ini, restarted httpd and now ssh2_connect() is working. Good luck!

phpDocumentor 2 installer fails to install symfony/Console with composer

I've downloaded (cloned) the github version of phpdocumentor 2 and followed the installation instructions found on the phpdoc website
At the composer installation step 3 (php composer.phar install) I receive the following error messages
[RuntimeException]
Failed to clone http://github.com/symfony/Console via git, https and http protocols, aborting.
- git://github.com/symfony/Console
fatal: reference is not a tree: 1edd7b739561e87bde81ff1c2ce08bd89e92277e
- https://github.com/symfony/Console
fatal: reference is not a tree: 1edd7b739561e87bde81ff1c2ce08bd89e92277e
- http://github.com/symfony/Console
fatal: reference is not a tree: 1edd7b739561e87bde81ff1c2ce08bd89e92277e
It seems that the symfony git tree has changed, or..? Do you have any idea how to resolve it?
This is probably an error int he update of the Console subtree split. Please use php composer.phar update instead of install. This should resolve the situation.

Resources