Can't Install socket.io in Laravel Vagrant Homestead - laravel-4

Problem Can't install socket.io in laravel vagrant homestead. Bellow error was thrown.
Command npm install socket.io
Error
> ws#0.5.0 install /home/vagrant/Code/dota2/nodejs/node_modules/socket.io/node_m
odules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory `/home/vagrant/Code/dota2/nodejs/node_modules/socket.io
/node_modules/engine.io/node_modules/ws/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/obj.target/bufferutil.node
SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
COPY Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
COPY Release/validation.node
make: Leaving directory `/home/vagrant/Code/dota2/nodejs/node_modules/socket.io/
node_modules/engine.io/node_modules/ws/build'
npm ERR! Error: UNKNOWN, symlink '../ws/bin/wscat'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 3.13.0-30-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/vagrant/Code/dota2/nodejs
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! path ../ws/bin/wscat
npm ERR! code UNKNOWN
npm ERR! errno -1
npm ERR! not ok code 0

Vagrant/Homestead virtual machine can't handle binary links.
Instead of
npm install socket.io
use
npm install socket.io --no-bin-links

Related

Unable to install sodium to Heroku

I've tried running npm install sodium in the Heroku console but it just returns
npm ERR! code 1
npm ERR! path /app/node_modules/sodium
npm ERR! command failed
npm ERR! command sh -c node install.js --preinstall
npm ERR! Static libsodium was not found at /app/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.
npm ERR! libtool is required, but wasn't found on this system
npm ERR! make: *** [Makefile:62: libsodium] Error 1
npm ERR! /app/node_modules/sodium/install.js:293
npm ERR! throw new Error(cmdLine + ' exited with code ' + code);
npm ERR! ^
npm ERR!
npm ERR! Error: make libsodium exited with code 2
npm ERR! at ChildProcess.<anonymous> (/app/node_modules/sodium/install.js:293:19)
npm ERR! at ChildProcess.emit (node:events:394:28)
npm ERR! at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! A complete log of this run can be found in:
npm ERR! /app/.npm/_logs/2021-08-10T23_25_41_425Z-debug.log
I was led to believe Heroku has libtool installed so I don't see why I can't install sodium.

Installing npm package acs fails due to incompatibility with tar#0.1.13

I'm trying to install the package acs through npm, but it fails and says it's not compatible with tar#0.1.13.
However when I run npm -g list it says that my installed version of tar is 2.1.1.
➜ ~ npm info tar version
2.1.1
But when I try to install acs it fails due to incompatibility with tar. See logs below:
➜ ~ npm install -g acs#1.0.25
> ws#0.4.32 install
/usr/local/lib/node_modules/acs/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
SOLINK_MODULE(target) Release/bufferutil.node
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/validation.node
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "acs#1.0.25"
npm ERR! node v0.12.7
npm ERR! npm v2.13.1
npm ERR! code ENOTSUP
npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your version of node/npm: tar#0.1.13
npm ERR! notsup Required: {"node":"~0.5.9 || 0.6 || 0.7 || 0.8"}
npm ERR! notsup Actual: {"npm":"2.13.1","node":"0.12.7"}
npm ERR! Please include the following file with any support request:
npm ERR! /Users/sinkensabe/npm-debug.log
I cant figure out why it says that it is incompatible with tar#0.1.13 when this is not a version that seems to be installed on my unix system.
Any help is appreciated!
Got it to work, not sure why though.. Removed everything related to node and installed node with homebrew. Then installing acs worked without any problems.
Followed the instructions here to remove node: http://tinyurl.com/qxyax6y

Error installing socket.io on Windows

I get this error message when I run "npm install socket.io." Can anyone help with this? Is the main problem with the "ws#0.5.0 script," whatever that is?
Also, what does the "node-gyp rebuild 2> builderror.log" mean? I've head that Python may be related to this problem, but I don't really know how.
Thanks a lot for your help!
$ npm install --save socket.io
npm WARN package.json famedu#1.0.0 No description
npm WARN package.json famedu#1.0.0 No repository field.
npm WARN package.json famedu#1.0.0 No README data
|
> ws#0.5.0 install
c:\codeprojects\famedu\node_modules\socket.io\node_modules\en
gine.io\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
/
> ws#0.4.31 install
c:\codeprojects\famedu\node_modules\socket.io\node_modules\s
ocket.io-client\node_modules\engine.io-client\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
npm ERR! ws#0.5.0 install: `(node-gyp rebuild 2> builderror.log) || (exit
0)`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the ws#0.5.0 install script.
npm ERR! This is most likely a problem with the ws package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! (node-gyp rebuild 2> builderror.log) || (exit 0)
npm ERR! You can get their info via:
npm ERR! npm owner ls ws
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program
Files\\nodej
s\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "socket.io"
npm ERR! cwd c:\codeprojects\famedu
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! syscall spawn
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! not ok code 0
You need to have both python 2.x and Visual Studio (Express Edition or higher) installed in order to build native dependencies on Windows.
ws is short for web socket; it's a socket client -- see https://www.npmjs.com/package/ws -- and ws needs to be compiled as a binary add-on.
There have been a lot of improvements to npm -- especially around conflicts and race conditions during install -- since 1.4.28. Can you try updating your npm installation?
To update npm on Windows, follow the instructions here: https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows

unable to install karma on windows vista for angular-phonecat tutorial

I am trying to run through the angular-phonecat tutorial. npm install failed for me, so I installed the packaged individually, except for karma which fails for me. Can someone help me solve this issue. ws compilation seems to be a known issue for windows, and the solution given for it is to update npm or reinstall nodeJs, i have done both of that, and I still get the error below. Please help.
$ npm install -g karma
npm WARN optional dep failed, continuing fsevents#0.3.1
ws#0.4.32 install C:\Users\user\AppData\Roaming\npm\node_modules\karma\node_
modules\socket.io\node_modules\socket.io-client\node_modules\ws
(node-gyp rebuild 2> builderror.log) || (exit 0)
npm ERR! ws#0.4.32 install: `(node-gyp rebuild 2> builderror.log) || (exit 0)`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the ws#0.4.32 install script.
npm ERR! This is most likely a problem with the ws package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! (node-gyp rebuild 2> builderror.log) || (exit 0)
npm ERR! You can get their info via:
npm ERR! npm owner ls ws
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.0.6002
npm ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodej
s\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "karma"
npm ERR! cwd c:\JavaScript\angular-phonecat
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! syscall spawn
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! not ok code 0

Node.js install canvas failed on mac osx 10.8.4 : src/Canvas.h.....fatal error: v8.h file not found

I install nodejs following nodejs wiki, it's going well, and then install node canvas following this way https://github.com/LearnBoost/node-canvas/wiki/Installation---OSX, the steps before "$ npm install canvas" were going well, but the final step "$ npm install canvas" was failed again and again, I have tried install the Nodejs both building and installing, and i also try "sudo", and I have try "$ export PKG_CONFIG_PATH=.....", but still can't install canvas, I'm sure I have followed all the guide clarely.
Below is the log:
SLMacs-MacBook-Pro-2:~ percy$ npm install canvas
npm http GET https://registry.npmjs.org/canvas
npm http 304 https://registry.npmjs.org/canvas
> canvas#1.0.3 install /Users/macbookpro/node_modules/canvas
> node-gyp rebuild
CXX(target) Release/obj.target/canvas/src/Canvas.o
In file included from ../src/Canvas.cc:7:
../src/Canvas.h:11:10: fatal error: 'v8.h' file not found
#include <v8.h>
^
1 error generated.
make: *** [Release/obj.target/canvas/src/Canvas.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:96:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Darwin 12.4.0
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/macbookpro/node_modules/canvas
gyp ERR! node -v v0.8.12
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok
npm ERR! canvas#1.0.3 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the canvas#1.0.3 install script.
npm ERR! This is most likely a problem with the canvas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls canvas
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 12.4.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "canvas"
npm ERR! cwd /Users/macbookpro
npm ERR! node -v v0.8.12
npm ERR! npm -v 1.1.63
npm ERR! code ELIFECYCLE
npm ERR! Error: EACCES, open 'npm-debug.log'
npm ERR! { [Error: EACCES, open 'npm-debug.log'] errno: 3, code: 'EACCES', path: 'npm-debug.log' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 12.4.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "canvas"
npm ERR! cwd /Users/macbookpro
npm ERR! node -v v0.8.12
npm ERR! npm -v 1.1.63
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open 'npm-debug.log'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/macbookpro/npm-debug.log
npm ERR! not ok code 0
I just ran into this problem myself. You may need to install some dependencies. Try running the following command in terminal.
brew install pkg-config cairo pango libpng jpeg giflib librsvg
Afterwards, rerun npm install. This worked for me.
To fix it:
Download the source code of node 0.10.13 from http://nodejs.org/dist/v0.10.13/node-v0.10.13.tar.gz
Extract this file via tar -xvz node-v0.10.13.tar.gz
Copy the 'deps', 'src' and 'tools' folders into '~/.node-gyp/0.10.13'
Then run 'npm install canvas' again.
I have no idea why the MacOS node package(just for v0.10.13) is missing these things.

Resources