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

Unable to install knex >= 0.12.4 #1746

Closed
jzimmek opened this Issue Oct 18, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@jzimmek

jzimmek commented Oct 18, 2016

I setup our CI and do a lot of from scratch/clean npm install of our software. We use knex (^0.12.5) and a bunch of other packages.

Installing all packages in package.json with "npm install", without any existing packages in global or node_modules, fails for knex 0.12.5 as well as 0.12.4. Version 0.12.3 of knex works fine.

The installation of the knex package fails on postinstall with exit code 1

...
npm info lifecycle knex@0.12.5~postinstall: knex@0.12.5

> knex@0.12.5 postinstall /node_modules/knex
> node ./scripts/build.js lib "npm run build"

root@d4ee47098521:/# echo $?
1

package.json:

{
  "name": "swate",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "author": "",
  "dependencies": {
    "apollo-client": "^0.4.21",
    "apollo-server": "^0.3.2",
    "autoprefixer": "^6.5.1",
    "babel-cli": "^6.14.0",
    "babel-core": "^6.14.0",
    "babel-loader": "^6.2.5",
    "babel-plugin-react-transform": "^2.0.2",
    "babel-plugin-transform-runtime": "^6.12.0",
    "babel-preset-es2015": "^6.14.0",
    "babel-preset-react": "^6.11.1",
    "babel-preset-react-hmre": "^1.1.1",
    "babel-preset-stage-0": "^6.5.0",
    "babel-register": "^6.14.0",
    "babel-runtime": "^6.11.6",
    "body-parser": "^1.15.2",
    "camelize": "^1.0.0",
    "compression": "^1.6.2",
    "cookie-parser": "^1.4.3",
    "cors": "^2.8.1",
    "css-loader": "^0.25.0",
    "css-modules-require-hook": "^4.0.5",
    "express": "^4.14.0",
    "extract-text-webpack-plugin": "^1.0.1",
    "file-loader": "^0.9.0",
    "graph.ql": "git+https://github.com/matthewmueller/graph.ql.git",
    "graphql": "0.7.1",
    "graphql-tag": "^0.1.14",
    "isomorphic-fetch": "^2.2.1",
    "js-cookie": "^2.1.3",
    "knex": "^0.12.5",
    "lodash": "^4.16.4",
    "moment": "^2.15.1",
    "node-uuid": "^1.4.7",
    "pg": "^6.1.0",
    "postcss-loader": "^0.13.0",
    "precss": "^1.4.0",
    "react": "^15.4.0-rc.4",
    "react-addons-update": "^15.4.0-rc.4",
    "react-apollo": "^0.5.10",
    "react-dom": "^15.4.0-rc.4",
    "react-fa": "^4.1.2",
    "react-redux": "^4.4.5",
    "react-router": "^4.0.0-alpha.3",
    "redux-form": "^6.1.0",
    "style-loader": "^0.13.1",
    "url-loader": "^0.5.7",
    "webpack": "^1.13.2",
    "webpack-dev-middleware": "^1.8.4",
    "webpack-hot-middleware": "^2.13.0"
  },
  "devDependencies": {
    "chokidar": "^1.6.1"
  }
}
root@d4ee47098521:/# npm -v
3.10.3
root@d4ee47098521:/# node -v
v6.7.0

But for some reason I am able to install knex alone (without the other packages in package.json) without any problem:

npm install knex@0.12.5

It seems like any of the packages in packages.json conflicts with what knex >= 0.12.4 is doing in the postinstall script. Only the knex package fails to install, removing it from package.json and I am able to install all the other packages in package.json without a problem.

Any help is really appreciated.

@tgriesser

This comment has been minimized.

Owner

tgriesser commented Oct 19, 2016

That's strange. So I've gone back and forth and actually didn't want to have this script added to Knex, but I caved and added it back in with #1708. I'll look to get this patched by removing the postinstall for now.

I guess the question here is... if someone wants to install from a specific commit on master, do you think it's reasonable to just ask them to do the work of cd'ing into the dir and running npm install & npm build themselves?

@tgriesser

This comment has been minimized.

Owner

tgriesser commented Oct 19, 2016

Removed in 0.12.6 - still interested to hear your take on the best recommendation for folks who want to use master. Ping @vellotis

@tgriesser tgriesser closed this Oct 19, 2016

@vellotis

This comment has been minimized.

Contributor

vellotis commented Oct 19, 2016

@tgriesser I couldn't replicate it with referenced NPM and NodeJS version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment