eXist-db / exist-stanford-nlp

XQuery wrapper around the Stanford CoreNLP pipeline
GNU Lesser General Public License v2.1
13 stars 6 forks source link

[BUG] Build failure #18

Closed joewiz closed 3 years ago

joewiz commented 3 years ago

Kudos, @lcahlander and @duncdrum!

For me, a fresh checkout and clone of e19f3bf49394ad4c3671cf7e29c5c6a2c65fec58 fails when running mvn clean package. Does anyone have any suggestions?

Here's my console output. I'm using macOS 11.2.3, OpenJDK 1.8.0_282 (Liberica), and Maven 3.8.1.

% mvn clean package
[INFO] Scanning for projects...
[INFO] 
[INFO] ---------------------< org.exist-db:stanford-nlp >----------------------
[INFO] Building Stanford Natural Language Processing 0.7.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ stanford-nlp ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ stanford-nlp ---
[INFO] 
[INFO] --- buildversion-plugin:1.0.3:set-properties (default) @ stanford-nlp ---
[INFO] 
[INFO] --- frontend-maven-plugin:1.9.1:install-node-and-npm (install node and npm) @ stanford-nlp ---
[INFO] Node v12.22.1 is already installed.
[INFO] NPM 7.9.0 is already installed.
[INFO] 
[INFO] --- frontend-maven-plugin:1.9.1:npm (npm version bump) @ stanford-nlp ---
[INFO] Running 'npm version --no-git-tag-version --allow-same-version=true 0.7.0-SNAPSHOT' in /Users/joe/workspace/exist-stanford-nlp/src/main/polymer
[INFO] v0.7.0-SNAPSHOT
[INFO] 
[INFO] --- frontend-maven-plugin:1.9.1:npm (npm install) @ stanford-nlp ---
[INFO] Running 'npm i' in /Users/joe/workspace/exist-stanford-nlp/src/main/polymer
[INFO] 
[INFO] up to date, audited 1528 packages in 4s
[INFO] 
[INFO] 30 packages are looking for funding
[INFO]   run `npm fund` for details
[INFO] 
[INFO] 29 vulnerabilities (17 low, 10 high, 2 critical)
[INFO] 
[INFO] To address issues that do not require attention, run:
[INFO]   npm audit fix
[INFO] 
[INFO] Some issues need review, and may require choosing
[INFO] a different dependency.
[INFO] 
[INFO] Run `npm audit` for details.
[INFO] 
[INFO] --- frontend-maven-plugin:1.9.1:npm (polymer build) @ stanford-nlp ---
[INFO] Running 'npm run build' in /Users/joe/workspace/exist-stanford-nlp/src/main/polymer
[INFO] 
[INFO] > polymer-starter-kit@0.7.0-SNAPSHOT build
[INFO] > polymer build
[INFO] 
[INFO] info:    Clearing build/ directory...
[INFO] info:    (esm-bundled) Building...
[INFO] info:    (es6-bundled) Building...
[INFO] info:    (es5-bundled) Building...
[INFO] error:   Uncaught exception: Error: not implemented
[INFO] error:   Error: not implemented
[INFO]     at Writable._write (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_writable.js:407:6)
[INFO]     at doWrite (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_writable.js:279:12)
[INFO]     at writeOrBuffer (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_writable.js:266:5)
[INFO]     at Writable.write (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_writable.js:211:11)
[INFO]     at DestroyableTransform.ondata (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_readable.js:572:20)
[INFO]     at DestroyableTransform.emit (events.js:314:20)
[INFO]     at readableAddChunk (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_readable.js:195:16)
[INFO]     at DestroyableTransform.Readable.push (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_readable.js:162:10)
[INFO]     at DestroyableTransform.Transform.push (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_transform.js:145:32)
[INFO]     at afterTransform (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_transform.js:101:12)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  26.895 s
[INFO] Finished at: 2021-04-12T15:12:51-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.9.1:npm (polymer build) on project stanford-nlp: Failed to run task: 'npm run build' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
duncdrum commented 3 years ago

Is your system node version 12? If not, that could cause a conflict (which would still be a bug). Do you have a global installed polymer CLI which is of a different version?

joewiz commented 3 years ago

@duncdrum Thank you! Indeed, my system node is v.15.14.0 (installed via brew install node - see the formula). I don't have a globally-installed polymer-cli:

% npm list -g
/usr/local/lib
├── @existdb/generator-exist@1.0.0 -> /Users/joe/workspace/generator-exist
├── bower@1.8.8
├── gulp@4.0.2
├── npm@7.9.0
└── yo@3.1.1

Is there anything more I can do to assist?

duncdrum commented 3 years ago

Does the build succeed with nodev12? (you can use nvm) to install and switch node versions

joewiz commented 3 years ago

Ok, I uninstalled node, set up nvm, ran nvm install 12, and am still getting the error:

% mvn clean package
[INFO] Scanning for projects...
[INFO] 
[INFO] ---------------------< org.exist-db:stanford-nlp >----------------------
[INFO] Building Stanford Natural Language Processing 0.7.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ stanford-nlp ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ stanford-nlp ---
[INFO] 
[INFO] --- buildversion-plugin:1.0.3:set-properties (default) @ stanford-nlp ---
[INFO] 
[INFO] --- frontend-maven-plugin:1.9.1:install-node-and-npm (install node and npm) @ stanford-nlp ---
[INFO] Node v12.22.1 is already installed.
[INFO] NPM 7.9.0 is already installed.
[INFO] 
[INFO] --- frontend-maven-plugin:1.9.1:npm (npm version bump) @ stanford-nlp ---
[INFO] Running 'npm version --no-git-tag-version --allow-same-version=true 0.7.0-SNAPSHOT' in /Users/joe/workspace/exist-stanford-nlp/src/main/polymer
[INFO] v0.7.0-SNAPSHOT
[INFO] 
[INFO] --- frontend-maven-plugin:1.9.1:npm (npm install) @ stanford-nlp ---
[INFO] Running 'npm i' in /Users/joe/workspace/exist-stanford-nlp/src/main/polymer
[INFO] 
[INFO] up to date, audited 1528 packages in 4s
[INFO] 
[INFO] 30 packages are looking for funding
[INFO]   run `npm fund` for details
[INFO] 
[INFO] 29 vulnerabilities (17 low, 10 high, 2 critical)
[INFO] 
[INFO] To address issues that do not require attention, run:
[INFO]   npm audit fix
[INFO] 
[INFO] Some issues need review, and may require choosing
[INFO] a different dependency.
[INFO] 
[INFO] Run `npm audit` for details.
[INFO] 
[INFO] --- frontend-maven-plugin:1.9.1:npm (polymer build) @ stanford-nlp ---
[INFO] Running 'npm run build' in /Users/joe/workspace/exist-stanford-nlp/src/main/polymer
[INFO] 
[INFO] > polymer-starter-kit@0.7.0-SNAPSHOT build
[INFO] > polymer build
[INFO] 
[INFO] info:    Clearing build/ directory...
[INFO] info:    (esm-bundled) Building...
[INFO] info:    (es6-bundled) Building...
[INFO] info:    (es5-bundled) Building...
[INFO] error:   Uncaught exception: Error: not implemented
[INFO] error:   Error: not implemented
[INFO]     at Writable._write (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_writable.js:407:6)
[INFO]     at doWrite (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_writable.js:279:12)
[INFO]     at writeOrBuffer (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_writable.js:266:5)
[INFO]     at Writable.write (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_writable.js:211:11)
[INFO]     at DestroyableTransform.ondata (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_readable.js:572:20)
[INFO]     at DestroyableTransform.emit (events.js:314:20)
[INFO]     at readableAddChunk (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_readable.js:195:16)
[INFO]     at DestroyableTransform.Readable.push (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_readable.js:162:10)
[INFO]     at DestroyableTransform.Transform.push (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_transform.js:145:32)
[INFO]     at afterTransform (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_transform.js:101:12)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  29.995 s
[INFO] Finished at: 2021-04-14T11:28:44-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.9.1:npm (polymer build) on project stanford-nlp: Failed to run task: 'npm run build' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Though looking at the console log, it appears that maven installs its own node 12, so the system version of node may not actually be relevant:

[INFO] --- frontend-maven-plugin:1.9.1:install-node-and-npm (install node and npm) @ stanford-nlp ---
[INFO] Node v12.22.1 is already installed.
[INFO] NPM 7.9.0 is already installed.

Is there anything else that looks fishy?

Mostly, I'm just looking to install the current version on 5.3.0-SNAPSHOT, so if someone could publish a release, that would do the trick. But ideally folks could also reliably build the package themselves using maven.

duncdrum commented 3 years ago

did you also tell nvm to nvm use 12? can you check node --version ? Theoretically the system version shouldn't matter, which is one of the big features of the plugin. But i found that to be tricky, with polymer-cli. This certainly looks like a node issue, but i can't reproduce it. I'll cut a release next week if we haven't gotten to the bottom of it.

joewiz commented 3 years ago

@duncdrum Yes, as soon as I ran nvm install 12 it responded:

Now using node v12.22.1 (npm v6.14.12)

For good measure, I just also ran nvm use 12, and got the same confirmation. Still, mvn clean package returned the same error. To rule out maven-specific issues, I manually triggered the polymer build step, and got the same error:

% node --version
v12.22.1
% cd src/main/polymer
% npm run build 

> polymer-starter-kit@0.7.0-SNAPSHOT build /Users/joe/workspace/exist-stanford-nlp/src/main/polymer
> polymer build

info:   Clearing build/ directory...
info:   (esm-bundled) Building...
info:   (es6-bundled) Building...
info:   (es5-bundled) Building...
error:  Uncaught exception: Error: not implemented
error:  Error: not implemented
    at Writable._write (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_writable.js:407:6)
    at doWrite (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_writable.js:279:12)
    at writeOrBuffer (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_writable.js:266:5)
    at Writable.write (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_writable.js:211:11)
    at DestroyableTransform.ondata (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_readable.js:572:20)
    at DestroyableTransform.emit (events.js:314:20)
    at readableAddChunk (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_readable.js:195:16)
    at DestroyableTransform.Readable.push (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_readable.js:162:10)
    at DestroyableTransform.Transform.push (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_transform.js:145:32)
    at afterTransform (/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/readable-stream/lib/_stream_transform.js:101:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! polymer-starter-kit@0.7.0-SNAPSHOT build: `polymer build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the polymer-starter-kit@0.7.0-SNAPSHOT build 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!     /Users/joe/.npm/_logs/2021-04-14T16_10_08_730Z-debug.log

That debug log file:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/Users/joe/.nvm/versions/node/v12.22.1/bin/node',
1 verbose cli   '/Users/joe/.nvm/versions/node/v12.22.1/bin/npm',
1 verbose cli   'run',
1 verbose cli   'build'
1 verbose cli ]
2 info using npm@6.14.12
3 info using node@v12.22.1
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle polymer-starter-kit@0.7.0-SNAPSHOT~prebuild: polymer-starter-kit@0.7.0-SNAPSHOT
6 info lifecycle polymer-starter-kit@0.7.0-SNAPSHOT~build: polymer-starter-kit@0.7.0-SNAPSHOT
7 verbose lifecycle polymer-starter-kit@0.7.0-SNAPSHOT~build: unsafe-perm in lifecycle true
8 verbose lifecycle polymer-starter-kit@0.7.0-SNAPSHOT~build: PATH: /Users/joe/.nvm/versions/node/v12.22.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/joe/workspace/exist-stanford-nlp/src/main/polymer/node_modules/.bin:/Users/joe/.nvm/versions/node/v12.22.1/bin:/Users/joe/.nvm/versions/node/v12.22.1/bin:/Users/joe/.nvm/versions/node/v12.22.1/bin:/Users/joe/.gem/ruby/3.0.0/bin:/Users/joe/.rbenv/shims:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/2.5.0/bin:/usr/local/opt/ruby/bin:/usr/local/sbin:/usr/local/bin:/Users/joe/.gem/ruby/3.0.0/bin:/Users/joe/.rbenv/shims:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/2.5.0/bin:/usr/local/opt/ruby/bin:/usr/local/sbin:/usr/local/bin:/Users/joe/.nvm/versions/node/v12.22.1/bin:/Users/joe/.gem/ruby/3.0.0/bin:/Users/joe/.rbenv/shims:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/2.5.0/bin:/usr/local/opt/ruby/bin:/usr/local/sbin:/usr/local/bin:/Users/joe/.gem/ruby/3.0.0/bin:/Users/joe/.rbenv/shims:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/2.5.0/bin:/usr/local/opt/ruby/bin:/usr/local/sbin:/usr/local/bin:/Users/joe/.gem/ruby/3.0.0/bin:/Users/joe/.rbenv/shims:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/2.5.0/bin:/usr/local/opt/ruby/bin:/usr/local/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Library/Apple/usr/bin
9 verbose lifecycle polymer-starter-kit@0.7.0-SNAPSHOT~build: CWD: /Users/joe/workspace/exist-stanford-nlp/src/main/polymer
10 silly lifecycle polymer-starter-kit@0.7.0-SNAPSHOT~build: Args: [ '-c', 'polymer build' ]
11 silly lifecycle polymer-starter-kit@0.7.0-SNAPSHOT~build: Returned: code: 1  signal: null
12 info lifecycle polymer-starter-kit@0.7.0-SNAPSHOT~build: Failed to exec build script
13 verbose stack Error: polymer-starter-kit@0.7.0-SNAPSHOT build: `polymer build`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/Users/joe/.nvm/versions/node/v12.22.1/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:314:20)
13 verbose stack     at ChildProcess.<anonymous> (/Users/joe/.nvm/versions/node/v12.22.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:314:20)
13 verbose stack     at maybeClose (internal/child_process.js:1022:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid polymer-starter-kit@0.7.0-SNAPSHOT
15 verbose cwd /Users/joe/workspace/exist-stanford-nlp/src/main/polymer
16 verbose Darwin 20.3.0
17 verbose argv "/Users/joe/.nvm/versions/node/v12.22.1/bin/node" "/Users/joe/.nvm/versions/node/v12.22.1/bin/npm" "run" "build"
18 verbose node v12.22.1
19 verbose npm  v6.14.12
20 error code ELIFECYCLE
21 error errno 1
22 error polymer-starter-kit@0.7.0-SNAPSHOT build: `polymer build`
22 error Exit status 1
23 error Failed at the polymer-starter-kit@0.7.0-SNAPSHOT build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
duncdrum commented 3 years ago

@eXist-db/exist-webcomponents anybody seen something like this before? @joewiz is this a new M1 mac?

joewiz commented 3 years ago

@duncdrum It's an intel iMac (Retina 5K, 27-inch, 2020).

joewiz commented 3 years ago

@duncdrum Thanks for alerting me to https://github.com/eXist-db/exist-stanford-nlp/pull/19 as a fix to my issue! At first, after pulling the latest from develop, mvn clean install produced the same error. But then, thinking that perhaps I had some stale assets, I ran git clean -xdf to remove all ignored files, and this time, mvn clean install produced a BUILD SUCCESS. Thank you!