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

Explicitly install peerdependencies #1233

Merged
merged 4 commits into from
Oct 14, 2019
Merged

Explicitly install peerdependencies #1233

merged 4 commits into from
Oct 14, 2019

Conversation

willholley
Copy link
Member

Overview

Builds on CentoOS are failing due to missing peerdependencies.
This adds the following packages explicitly in package.json:

  • acorn
  • ajv

Testing recommendations

I verified the fix with the following Dockerfile:

FROM couchdbdev/centos-8-erlang-20.3.8.22-1:latest

USER root
WORKDIR /usr/src

RUN set -xe; \
    git clone https://github.com/apache/couchdb-fauxton; \
    cd couchdb-fauxton; \
    git checkout peerdependencies; \
    npm install --production && ./node_modules/grunt-cli/bin/grunt couchdb

GitHub issue number

Fixes #1230 (properly)

Related Pull Requests

Checklist

  • Code is written and works correctly;
  • Changes are covered by tests;
  • Documentation reflects the changes;
  • Update rebar.config.script with the correct tag once a new Fauxton release is made

package.json Show resolved Hide resolved
@wohali
Copy link
Member

wohali commented Oct 10, 2019

FYI this seems to have been breaking debian as well. You should update your commit message to match. My guess is that it's a Node v8 -> v10 and associated npm upgrade breakage, but I didn't test that.

Applying this patch manually has resolved the issue, tested on both x86_64 and arm64v8. ppc64le is still running, I'll have a result later tonight (have to run to a commitment).

@wohali
Copy link
Member

wohali commented Oct 10, 2019

Wow, I'd say that's still a problem on ppc64le:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] webpack:release: `webpack --optimize-minimize --debug --progress --colors --config ./webpack.config.release.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] webpack:release script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jenkins/.npm/_logs/2019-10-10T23_08_15_712Z-debug.log
Warning: Command failed: npm run webpack:release
/home/jenkins/couchdb/src/fauxton/node_modules/webpack-cli/bin/cli.js:93
                                throw err;
                                ^

RangeError [ERR_OUT_OF_RANGE]: The value of "fd" is out of range. It must be >= 0 && <= 2147483647. Received 5.104235503814077e+38
    at createHandle (net.js:99:3)
    at new Socket (net.js:266:20)
    at createWritableStdioStream (/home/jenkins/couchdb/src/fauxton/node_modules/debug/src/node.js:194:16)
    at Object.<anonymous> (/home/jenkins/couchdb/src/fauxton/node_modules/debug/src/node.js:69:14)
    at Module._compile (/home/jenkins/couchdb/src/fauxton/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (/home/jenkins/couchdb/src/fauxton/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/home/jenkins/couchdb/src/fauxton/node_modules/debug/src/index.js:9:20)
    at Module._compile (/home/jenkins/couchdb/src/fauxton/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (/home/jenkins/couchdb/src/fauxton/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/home/jenkins/couchdb/src/fauxton/node_modules/snapdragon/lib/compiler.js:5:13)
    at Module._compile (/home/jenkins/couchdb/src/fauxton/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (/home/jenkins/couchdb/src/fauxton/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/home/jenkins/couchdb/src/fauxton/node_modules/snapdragon/index.js:5:16)
    at Module._compile (/home/jenkins/couchdb/src/fauxton/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] webpack:release: `webpack --optimize-minimize --debug --progress --colors --config ./webpack.config.release.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] webpack:release script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

CouchDB Docker images now use nodejs 10 by default. This commit updates
Travis to use nodejs 10 when running integration tests.

It also adds and `npm ls` check which will fail if there are
unmet peer dependencies in package.json.
Builds against recent nodejs versions are failing due to
missing peerdependencies. This adds the following packages
explicitly in package.json:

 * acorn
 * ajv

Fixes #1230 (properly)
We can now reference this directly from npm instead of resolving
from GitHub. The reference to GitHub was incorrect (referenced
non-existent gh-pages tag) which resulted in a resolution error
in the latest npm.
@willholley
Copy link
Member Author

The build now checks that there are no missing peer dependencies. I still don't understand why the webpack step fails in the CouchDB CI Dockerfiles but not in Travis or on a local machine but checking for missing peer dependencies at least prevents this specific problem.

@willholley willholley merged commit e6b43e1 into master Oct 14, 2019
@willholley willholley deleted the peerdependencies branch October 14, 2019 15:25
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

Successfully merging this pull request may close these issues.

Fauxton failing to build on Centos 7 CI container
3 participants