brewfactory/BrewCore

bower ESUDO Cannot be run with sudo

Johnwulp opened this issue · 6 comments

Hi,

I'm trying to install this package, but it is failing at the brew-ui@1.4.0 postinstall script.

During npm install i receive this error:

[root@srv01 BrewCore]# npm install

ws@0.4.31 install /home/nodejs/BrewCore/node_modules/brew-ui/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
(node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory /home/nodejs/BrewCore/node_modules/brew-ui/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build' CXX(target) Release/obj.target/bufferutil/src/bufferutil.o make: Leaving directory/home/nodejs/BrewCore/node_modules/brew-ui/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build'

brew-ui@1.4.0 postinstall /home/nodejs/BrewCore/node_modules/brew-ui
bower install

bower ESUDO Cannot be run with sudo

Additional error details:
Since bower is a user command, there is no need to execute it with superuser permissions.
If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.

http://www.joyent.com/blog/installing-node-and-npm
https://gist.github.com/isaacs/579814

You can however run a command with sudo using --allow-root option

npm ERR! Linux 2.6.32-042stab092.3
npm ERR! argv "/root/.nvm/v0.11.14/bin/node" "/root/.nvm/v0.11.14/bin/npm" "install"
npm ERR! node v0.11.14
npm ERR! npm v2.0.0
npm ERR! code ELIFECYCLE
npm ERR! brew-ui@1.4.0 postinstall: bower install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the brew-ui@1.4.0 postinstall script.
npm ERR! This is most likely a problem with the brew-ui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! bower install
npm ERR! You can get their info via:
npm ERR! npm owner ls brew-ui
npm ERR! There is likely additional logging output above.

bower install --allow-root seemed to do the trick.

You shouldn't run/install node/bower with sudo. Isn't it possible that you did it in this way?

The problem is i didn't installed it with sudo, so don't know why this message appears. On my VPS i also have the same error.

On my vps i have node 0.11. But still no luck.

This is my install log:

[root@srv01 nodejs]# nvm use 0.11
Now using node v0.11.14
[root@srv01 nodejs]# git clone https://github.com/brewfactory/BrewCore.git
git: /usr/local/lib/libz.so.1: no version information available (required by git)
Initialized empty Git repository in /home/nodejs/BrewCore/.git/
git-remote-https: /usr/local/lib/libz.so.1: no version information available (required by git-remote-https)
git: /usr/local/lib/libz.so.1: no version information available (required by git)
remote: Counting objects: 582, done.
remote: Compressing objects: 100% (3/3), done.
git: /usr/local/lib/libz.so.1: no version information available (required by git)
remote: Total 582 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (582/582), 132.88 KiB, done.
Resolving deltas: 100% (280/280), done.
[root@srv01 nodejs]# npm install -g bower
/root/.nvm/v0.11.14/bin/bower -> /root/.nvm/v0.11.14/lib/node_modules/bower/bin/bower
bower@1.3.12 /root/.nvm/v0.11.14/lib/node_modules/bower
├── is-root@1.0.0
├── junk@1.0.0
├── stringify-object@1.0.0
├── abbrev@1.0.5
├── chmodr@0.1.0
├── which@1.0.5
├── osenv@0.1.0
├── opn@1.0.0
├── archy@0.0.2
├── rimraf@2.2.8
├── bower-logger@0.2.2
├── lru-cache@2.5.0
├── bower-endpoint-parser@0.2.2
├── graceful-fs@3.0.4
├── lockfile@1.0.0
├── nopt@3.0.1
├── retry@0.6.0
├── tmp@0.0.23
├── request-progress@0.3.0 (throttleit@0.0.2)
├── q@1.0.1
├── chalk@0.5.0 (escape-string-regexp@1.0.2, ansi-styles@1.1.0, supports-color@0.2.0, strip-ansi@0.3.0, has-ansi@0.1.0)
├── semver@2.3.2
├── shell-quote@1.4.2 (array-filter@0.0.1, array-reduce@0.0.0, array-map@0.0.0, jsonify@0.0.0)
├── bower-json@0.4.0 (intersect@0.0.3, deep-extend@0.2.11, graceful-fs@2.0.3)
├── fstream@1.0.2 (inherits@2.0.1)
├── p-throttler@0.1.0 (q@0.9.7)
├── promptly@0.2.0 (read@1.0.5)
├── mkdirp@0.5.0 (minimist@0.0.8)
├── fstream-ignore@1.0.1 (inherits@2.0.1, minimatch@1.0.0)
├── bower-config@0.5.2 (osenv@0.0.3, graceful-fs@2.0.3, optimist@0.6.1)
├── tar-fs@0.5.2 (pump@0.3.5, tar-stream@0.4.7)
├── decompress-zip@0.0.8 (nopt@2.2.1, mkpath@0.1.0, touch@0.0.2, readable-stream@1.1.13, binary@0.3.0)
├── request@2.42.0 (caseless@0.6.0, json-stringify-safe@5.0.0, aws-sign2@0.5.0, forever-agent@0.5.2, stringstream@0.0.4, oauth-sign@0.4.0, tunnel-agent@0.4.0, node-uuid@1.4.1, qs@1.2.2, mime-types@1.0.2, form-data@0.1.4, bl@0.9.3, tough-cookie@0.12.1, http-signature@0.10.0, hawk@1.1.1)
├── glob@4.0.6 (inherits@2.0.1, once@1.3.1, minimatch@1.0.0)
├── bower-registry-client@0.2.1 (graceful-fs@2.0.3, request-replay@0.2.0, lru-cache@2.3.1, async@0.2.10, mkdirp@0.3.5, request@2.27.0)
├── update-notifier@0.2.0 (semver-diff@0.1.0, string-length@0.1.2, latest-version@0.2.0, configstore@0.3.1)
├── cardinal@0.4.0 (redeyed@0.4.4)
├── mout@0.9.1
├── handlebars@2.0.0 (optimist@0.3.7, uglify-js@2.3.6)
├── inquirer@0.7.1 (figures@1.3.5, through@2.3.6, mute-stream@0.0.4, readline2@0.1.0, lodash@2.4.1, cli-color@0.3.2, rx@2.3.18)
└── insight@0.4.3 (object-assign@1.0.0, async@0.9.0, chalk@0.5.1, os-name@1.0.1, lodash.debounce@2.4.1, tough-cookie@0.12.1, configstore@0.3.1, inquirer@0.6.0)
[root@srv01 nodejs]# npm install BrewCore/

ws@0.5.0 install /home/nodejs/node_modules/BrewCore/node_modules/socket.io/node_modules/engine.io/node_modules/ws
(node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory /home/nodejs/node_modules/BrewCore/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/nodejs/node_modules/BrewCore/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'
|

ws@0.4.31 install /home/nodejs/node_modules/BrewCore/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
(node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory /home/nodejs/node_modules/BrewCore/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build' CXX(target) Release/obj.target/bufferutil/src/bufferutil.o make: Leaving directory/home/nodejs/node_modules/BrewCore/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build'

kerberos@0.0.4 install /home/nodejs/node_modules/BrewCore/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos
(node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory /home/nodejs/node_modules/BrewCore/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build' SOLINK_MODULE(target) Release/obj.target/kerberos.node SOLINK_MODULE(target) Release/obj.target/kerberos.node: Finished COPY Release/kerberos.node make: Leaving directory/home/nodejs/node_modules/BrewCore/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build'
|

bson@0.2.15 install /home/nodejs/node_modules/BrewCore/node_modules/mongoose/node_modules/mongodb/node_modules/bson
(node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory /home/nodejs/node_modules/BrewCore/node_modules/mongoose/node_modules/mongodb/node_modules/bson/build' CXX(target) Release/obj.target/bson/ext/bson.o SOLINK_MODULE(target) Release/obj.target/bson.node SOLINK_MODULE(target) Release/obj.target/bson.node: Finished COPY Release/bson.node make: Leaving directory/home/nodejs/node_modules/BrewCore/node_modules/mongoose/node_modules/mongodb/node_modules/bson/build'
\

ws@0.4.31 install /home/nodejs/node_modules/BrewCore/node_modules/brew-ui/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
(node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory /home/nodejs/node_modules/BrewCore/node_modules/brew-ui/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build' CXX(target) Release/obj.target/bufferutil/src/bufferutil.o make: Leaving directory/home/nodejs/node_modules/BrewCore/node_modules/brew-ui/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build'

brew-ui@1.4.0 postinstall /home/nodejs/node_modules/BrewCore/node_modules/brew-ui
bower install

bower ESUDO Cannot be run with sudo

Additional error details:
Since bower is a user command, there is no need to execute it with superuser permissions.
If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.

http://www.joyent.com/blog/installing-node-and-npm
https://gist.github.com/isaacs/579814

You can however run a command with sudo using --allow-root option

npm ERR! Linux 2.6.32-042stab092.3
npm ERR! argv "/root/.nvm/v0.11.14/bin/node" "/root/.nvm/v0.11.14/bin/npm" "install" "BrewCore/"
npm ERR! node v0.11.14
npm ERR! npm v2.0.0
npm ERR! code ELIFECYCLE
npm ERR! brew-ui@1.4.0 postinstall: bower install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the brew-ui@1.4.0 postinstall script.
npm ERR! This is most likely a problem with the brew-ui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! bower install
npm ERR! You can get their info via:
npm ERR! npm owner ls brew-ui
npm ERR! There is likely additional logging output above.
[root@srv01 nodejs]#

I'm using this project on Heroku with continuously deployed by Codeship without problem.
But I will check it. I've no idea yet why do you got this error.

I Created a app on Heroku, and it's running from there right now, so it's working. I also got no clue why this won't run on my VPS without this error. If i add the --allow-root option is does install the brew-ui. Maybe a solution is to add this to the postinstall in the brew-ui package?