Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install fails if bower is not already installed #28

Open
onelson opened this issue Jun 30, 2015 · 1 comment
Open

install fails if bower is not already installed #28

onelson opened this issue Jun 30, 2015 · 1 comment

Comments

@onelson
Copy link

onelson commented Jun 30, 2015

npm ERR! react-foundation-apps@0.6.1 postinstall: `bower install`
npm ERR! Exit status 127
npm ERR! 
npm ERR! Failed at the react-foundation-apps@0.6.1 postinstall script.
npm ERR! This is most likely a problem with the react-foundation-apps 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 react-foundation-apps
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.19.0-21-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/owen/projects/activatefan.club/client-src
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE

Seems odd to expect bower to be installed. If you're going to depend on it, you could add it as a dependency of this package (or better yet skip bower entirely and just install foundation-apps via npm: https://www.npmjs.com/package/foundation-apps).

@joemsak
Copy link

joemsak commented Oct 28, 2015

I get a similar issue on Heroku deploy

Building dependencies
remote:        Pruning any extraneous modules
remote:        Installing node modules (package.json)
remote:
remote:        > history@1.13.0 postinstall /tmp/build_d158241afbd7f01060ac107fdc419d60/node_modules/history
remote:        > node ./npm-scripts/postinstall.js
remote:
remote:
remote:        > history@1.12.3 postinstall /tmp/build_d158241afbd7f01060ac107fdc419d60/node_modules/react-router/node_modules/history
remote:        > node -e "require('fs').stat('lib', function (e, s) { process.exit(e || !s.isDirectory() ? 1 : 0) })" || npm run build
remote:
remote:
remote:        > react-router@1.0.0-rc3 postinstall /tmp/build_d158241afbd7f01060ac107fdc419d60/node_modules/react-router
remote:        > node -e "require('fs').stat('lib', function (e, s) { process.exit(e || !s.isDirectory() ? 1 : 0) })" || npm run build
remote:
remote:
remote:        > react-foundation-apps@0.6.1 postinstall /tmp/build_d158241afbd7f01060ac107fdc419d60/node_modules/react-foundation-apps
remote:        > bower install
remote:
remote:        sh: 1: bower: not found
/* package.json */
{
   ...
  "dependencies": {
    "assets-webpack-plugin": "2.2.0",
    "autoprefixer-loader": "2.0.0",
    "babel": "5.6.14",
    "babel-core": "5.6.15",
    "babel-eslint": "3.1.20",
    "babel-jest": "5.3.0",
    "babel-loader": "5.2.2",
    "babel-runtime": "5.6.15",
    "bower": "^1.6.5",
    "compression": "1.5.1",
    "css-loader": "0.14.4",
    "ejs": "2.3.3",
    "express": "4.13.1",
    "express-ejs-layouts": "1.1.0",
    "history": "^1.13.0",
    "object-assign": "^2.0.0",
    "react": "0.13.3",
    "react-foundation-apps": "^0.6.1",
    "react-router": "^1.0.0-rc3",
    "sass-loader": "1.0.2",
    "style-loader": "0.12.3",
    "webpack": "1.10.1"
  },
  "devDependencies": {
    "coveralls": "2.11.2",
    "eslint": "0.24.0",
    "eslint-loader": "0.14.1",
    "eslint-plugin-react": "2.6.3",
    "jest-cli": "0.4.13",
    "jsx-loader": "0.13.2",
    "node-libs-browser": "0.5.2",
    "react-hot-loader": "1.2.7",
    "react-tools": "0.13.3",
    "webpack-dev-server": "1.10.1"
  },

  ...
}

You can see bower is in dependencies and NOT devDependencies

Edit: happens locally too if I don't use npm install bower -g

Edit 2: if I run npm install twice locally, it works. Unfortunately that's not an option on heroku...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants