S
S
saveTibet2016-10-22 23:26:28
macOS
saveTibet, 2016-10-22 23:26:28

How to resolve such errors when installing BEM project-stub?

I'm trying to start learning BEM with this tutorial . After the repository is cloned from the github, I enter npm install to install the dependencies and endure the fail. Here is the process listing:

bimbatron:bem bimba$ npm install

> [email protected] postinstall /Users/bimba/BEM
> npm run deps


> [email protected] deps /Users/bimba/BEM
> bower i --allow-root

bower EACCES        EACCES: permission denied, mkdir '/Users/bimba/.cache/bower/registry/bower.herokuapp.com'

Stack trace:
Error: EACCES: permission denied, mkdir '/Users/bimba/.cache/bower/registry/bower.herokuapp.com'
    at Error (native)
    at Object.fs.mkdirSync (fs.js:922:18)
    at sync (/Users/bimba/BEM/node_modules/bower/lib/node_modules/bower-registry-client/node_modules/mkdirp/index.js:55:12)
    at Function.sync (/Users/bimba/BEM/node_modules/bower/lib/node_modules/bower-registry-client/node_modules/mkdirp/index.js:61:24)
    at new Cache (/Users/bimba/BEM/node_modules/bower/lib/node_modules/bower-registry-client/lib/util/Cache.js:21:16)
    at RegistryClient.<anonymous> (/Users/bimba/BEM/node_modules/bower/lib/node_modules/bower-registry-client/lib/lookup.js:162:35)
    at Array.forEach (native)
    at RegistryClient.initCache (/Users/bimba/BEM/node_modules/bower/lib/node_modules/bower-registry-client/lib/lookup.js:149:34)
    at RegistryClient._initCache (/Users/bimba/BEM/node_modules/bower/lib/node_modules/bower-registry-client/Client.js:65:27)
    at new RegistryClient (/Users/bimba/BEM/node_modules/bower/lib/node_modules/bower-registry-client/Client.js:19:10)

Console trace:
Error
    at StandardRenderer.error (/Users/bimba/BEM/node_modules/bower/lib/renderers/StandardRenderer.js:81:37)
    at Logger.<anonymous> (/Users/bimba/BEM/node_modules/bower/lib/bin/bower.js:110:26)
    at emitOne (events.js:96:13)
    at Logger.emit (events.js:188:7)
    at Logger.emit (/Users/bimba/BEM/node_modules/bower/lib/node_modules/bower-logger/lib/Logger.js:29:39)
    at /Users/bimba/BEM/node_modules/bower/lib/commands/index.js:48:20
    at _rejected (/Users/bimba/BEM/node_modules/bower/lib/node_modules/q/q.js:844:24)
    at /Users/bimba/BEM/node_modules/bower/lib/node_modules/q/q.js:870:30
    at Promise.when (/Users/bimba/BEM/node_modules/bower/lib/node_modules/q/q.js:1122:31)
    at Promise.promise.promiseDispatch (/Users/bimba/BEM/node_modules/bower/lib/node_modules/q/q.js:788:41)
System info:
Bower version: 1.7.9
Node version: 6.9.1
OS: Darwin 15.6.0 x64

npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/bimba/.nvm/versions/node/v6.9.1/bin/node" "/Users/bimba/.nvm/versions/node/v6.9.1/bin/npm" "run" "deps"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] deps: `bower i --allow-root`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] deps script 'bower i --allow-root'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bem-project-stub package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     bower i --allow-root
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs bem-project-stub
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls bem-project-stub
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/bimba/BEM/npm-debug.log

npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/bimba/.nvm/versions/node/v6.9.1/bin/node" "/Users/bimba/.nvm/versions/node/v6.9.1/bin/npm" "install"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall: `npm run deps`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'npm run deps'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bem-project-stub package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run deps
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs bem-project-stub
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls bem-project-stub
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/bimba/BEM/npm-debug.log

The first mistake that catches your eye is some path that mentions the heroku app. I tried clearing bower's cache, but it doesn't help, the error reappears (by the way, how do I remove heroku completely from the system?).
What follows is information that doesn't tell me much. What is my problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
saveTibet, 2016-10-23
@alekseyruzov

The problem was solved by changing the owner of the problematic directories. They were owned by root.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question