Why does bower not install socket.io.js file? - socket.io

When I run bower install socket.io bower installs just fine but when looking at the installed file there is no socket.io.js file.. the issue with that is when trying to use the bower components as dependencies in my project I can't require('socket.io') (using debowerify) because its looking for bower_components/socket.io/socket.io.js
does anyone know why this is happening and what I need to do to fix this?
this is what bower install socket.io installs
the error message I get is
Error: module "./../../bower_components/socket.io/socket.io.js" not
found

From going through the getting started guide http://socket.io/docs/# there are two components to socket.io, one each for the server and client side code.
The client side code is separately installable from here https://www.npmjs.com/package/socket.io-client and it gives us a clue as to what is up ...
From the above we are told
A standalone build of socket.io-client is exposed automatically by the socket.io server as /socket.io/socket.io.js
So it's a little bit of magic that enables access to the client side code via the server side code which I think would explain the discrepancies with what we see in under the bower_components folder post install.
In the case of a node app using express you can reference socket.io.js on client side html simply by including it <script src="socket.io.js"></script> and then making reference a presumably global io object that is introduced by that.
Hope this helps

Related

Getting error when import card to Hyperledger Composer

I get the following error when I try to import a card using composer-rest-server multiple mode.
First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object."
It was working fine before. I tried with both composer versions, 0.19.16 and hlfv11, and 0.20 hlfv12 but I get the error.
Also when I want to Authenticate to the REST server by navigating to the value of the authPath property through http://localhost:3000/auth/github I get the following error in my terminal but it successfully backs to composer rest server. When it was working fine I did not get such an error.
"Browse your REST API at http://localhost:3000/explorer
Potential security alert: hidden/protected properties ["password","verificationToken"] are used in query."
The problem you are seeing is due to a dependency in the dependency tree of the composer rest server being broken recently and so any npm installs of composer-rest-server will experience this problem as it will pull in this broken dependency.
Composer 0.19.17 has fixed this problem (and it will also be fixed in 0.20.3 when it is released). You can either move to these versions or you can use the docker image of composer rest server which has already downloaded the dependencies and doesn't include the broken dependency.

Laravel 5.4 go live with no npm installed

I've just finished my first project with laravel.
Now when I want to go live, I suddenly discovered that my host does not allow installation of nodejs on their shard host package.
The shock the horror....
I managed to do everything on the live server, I ran npm run production on my local machine and uploaded the minified files for the css and js.
The problem is, on my shard server, I still get this vue warning:
You are running Vue in development mode. Make sure to turn on
production mode when deploying for production. See more tips at
https://vuejs.org/guide/deployment.html
but not on my local machine.
Looking at the link they refer to, I don't really understand what I need to do as I'm new to laravel, npm, node and vue.
How can I turn vue to production mode manually without npm?
Is it possible?
Yes, you can adjust this manually. If you are using the Laravel scaffolding for Laravel Mix, add the following lines to your resources/js/bootstrap.js file
Vue.config.devtools = false
Vue.config.debug = false
Vue.config.silent = true
These lines will suppress the warnings, debugging and turn off devtools, essentially the same as npm run production. This will also turn them off in your local environment, but it is probably your only solution.

I am unable to deploy phoenix app to heroku because of failed dependency (called coherence) compilation, how to make it work?

So to start I made an Elixir application using Phoenix framework.
This application uses coherence dependency for authentication to the website. This dependency was installed as it is advised on the git repo with -full argument to install all the options coherence has.
Then, I did just change a couple of lines in config.exs file of my project to use mailgun service for mailing and put credentials over there.
Next, I installed and configured my other deps (they have nothing to do with coherence).
Locally, my application could compile and run without problems.
Then, I wanted to deploy it to Heroku using Phoenix guidelines.
When I completed all the steps, I got an error when trying to push the application to Heroku.
I then tried to check the file lib/mix/tasks/coherence.clean.ex and the line 162 where I found a comment that said there is an error with updating a config file, but I couldn't figure out what that means and how to solve that.
I tried to make a fresh phoenix application, installing coherence with the same or different options and afterward deploying it following the Phoenix guidelines. Every time I was getting the same error.
I also want to note that I did try to create elixir_buildpack.config file and putting always_rebuild=true there and had no success. (it is a solution mentioned in troubleshooting section of deploying to Heroku guide)
So, my question is, what do I need to change in my config.exs file (or elsewhere) in order to make at least a fresh application with coherence installed to compile and work on Heroku?
useful links:
coherence dep github link
Thanks a ton guys.
The Heroku Buildpack for Elixir currently defaults to Elixir 1.2.6 while the code that throws that error uses the else syntax with with, a feature that was added in Elixir 1.3.0, so you need to set the Elixir version to use to 1.3.0 or later by adding the following to elixir_buildpack.config:
elixir_version=1.3.2

silex do i need composer to autoload?

I install my web site on ovh server but i think composer it not install on it.
So i have a fatal error
Class 'App\Models\Product\ProductModel' not found in /home/xxxxx/App/Controller/Home/HomeController.php on line 26
in my ftp i have
composer.json
App
bootstrap.php
Model
Product
ProductModel.php
Controller
indexController.php
Home
HomeController.php
www
index.php
I auto load App as App
Do you know if the problem is composer?
Do you know if i can use with out composer?
How?
thank you
Use Composer before you upload your code. Composer need not be executed on the server - in fact this is regarded more of a problem than a solution because it requires all package hosting servers to be up, and the command line tools for accessing version control systems be installed (at least as a fallback).
The recommended way to use Composer is to run it locally (or on a deployment machine that is local enough), let it fetch all files, create the autoloader, and then copy all the collected files to the target server.
This approach also resolves the problem with Composer requiring about 1GB of memory (or more, depending on how many packages have to be considered) when being run - if your web server has less memory installed, you won't be able to use Composer.

Symfony2 deployment via ftp

I tried to deploy my project with capifony, becouse I found here an answer, that with capifony deployment is easy. Well I don't think it is, so my question is:
How can I deploy my project via ftp, I put all my files on the server but even if I browse to web/app.php, the only thing I get is an empty page, whatever route I write in the url. So someone please explain me how can I get this work! Thank you!
A couple of things to think of when deploying a Symfony2 project to a new server or computer (as far as I've encountered) might be:
Make sure that the server and it's PHP installation meets the Symfony2 requirements (and perhaps also the recommendations)
Check that you've somewhat followed the installation instructions (found here)
Try to clear the cache
Make sure that the web server and it's PHP process have write permissions to the cache folder
If none of these helps, try to modify the app_dev.php to temporarily allow access from your current (client) IP (instead of restraining it to localhost). Then, hopefully, you'll get a more useful and detailed error message, instead of the blank page (which often is caused by some fatal error that have occurred during the initialization of the framework and its kernel)
Update: Noticed now that you've tagged your question with 'windows', but that you don't mention which server you're trying to deploy to. I wrote the above with some *nix based server in mind, but hopefully some of it are applicable to Windows servers too (but there might be other common sources of error running under Windows that I'm not familliar with

Resources