If people are having issues, try building with extra-x86_64-build in a clean chroot.
What does this mean? What do I need to do for that, @agkphysics ?
Git Clone URL: | https://aur.archlinux.org/zotero.git (read-only, click to copy) |
---|---|
Package Base: | zotero |
Description: | A free, easy-to-use tool to help you collect, organize, cite, and share your research sources. |
Upstream URL: | https://github.com/zotero/zotero |
Licenses: | AGPL3 |
Submitter: | agkphysics |
Maintainer: | agkphysics |
Last Packager: | agkphysics |
Votes: | 23 |
Popularity: | 1.13 |
First Submitted: | 2022-08-13 10:04 (UTC) |
Last Updated: | 2024-03-28 07:08 (UTC) |
If people are having issues, try building with extra-x86_64-build in a clean chroot.
What does this mean? What do I need to do for that, @agkphysics ?
If you are running it in a VM maybe the problem is the disk space. Try to expand the disk space or create a new VM with at least 20 GiB
If people are having issues, try building with extra-x86_64-build
in a clean chroot.
Following up on my own earlier comment below, building without the NODE_OPTIONS=..
line (as suggested by @avemilia - 2022.11.13) is possible but only permits a degraded execution of Zotero standalone. That means that Zotero's existing items notes becomes inaccessible and no new note can be created be that for a new or an existing item in any collection.
No go for me.
@rcrath: following your lead, on kernel 6.1.9, and this code (v6.0.20-1), setting line 99 as you did NODE_OPTIONS= npm run build
, I got:
Error: { Error: Command failed: npm run build
[webpack-cli] SyntaxError: Invalid regular expression: /(\p{Uppercase_Letter}+|\p{Lowercase_Letter}|\d)(\p{Uppercase_Letter}+)/: Invalid escape
at pathToArgumentName (/var/builds/zotero/src/zotero-client/note-editor/node_modules/webpack/lib/cli.js:67:4)
at addFlag (/var/builds/zotero/src/zotero-client/note-editor/node_modules/webpack/lib/cli.js:207:16)
at traverse (/var/builds/zotero/src/zotero-client/note-editor/node_modules/webpack/lib/cli.js:284:21)
at traverse (/var/builds/zotero/src/zotero-client/note-editor/node_modules/webpack/lib/cli.js:340:23)
at traverse (/var/builds/zotero/src/zotero-client/note-editor/node_modules/webpack/lib/cli.js:289:24)
at Object.getArguments (/var/builds/zotero/src/zotero-client/note-editor/node_modules/webpack/lib/cli.js:349:2)
at WebpackCLI.getBuiltInOptions (/var/builds/zotero/src/zotero-client/note-editor/node_modules/webpack-cli/lib/webpack-cli.js:777:47)
at makeCommand (/var/builds/zotero/src/zotero-client/note-editor/node_modules/webpack-cli/lib/webpack-cli.js:907:32)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! zotero-note-editor@1.0.0 build: `webpack --node-env production`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the zotero-note-editor@1.0.0 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! /home/USER/.npm/_logs/2023-02-03T15_05_24_568Z-debug.log
at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
killed: false,
code: 2,
signal: null,
cmd: 'npm run build',
stdout: '\n> zotero-note-editor@1.0.0 build /var/builds/zotero/src/zotero-client/note-editor\n> webpack --node-env production\n\n',
stderr: '[webpack-cli] SyntaxError: Invalid regular expression: /(\\p{Uppercase_Letter}+|\\p{Lowercase_Letter}|\\d)(\\p{Uppercase_Letter}+)/: Invalid escape\n at pathToArgumentName (/var/builds/zotero/src/zotero-client/note-editor/node_modules/webpack/lib/cli.js:67:4)\n at addFlag (/var/builds/zotero/src/zotero-client/note-editor/node_modules/webpack/lib/cli.js:207:16)\n at traverse (/var/builds/zotero/src/zotero-client/note-editor/node_modules/webpack/lib/cli.js:284:21)\n at traverse (/var/builds/zotero/src/zotero-client/note-editor/node_modules/webpack/lib/cli.js:340:23)\n at traverse (/var/builds/zotero/src/zotero-client/note-editor/node_modules/webpack/lib/cli.js:289:24)\n at Object.getArguments (/var/builds/zotero/src/zotero-client/note-editor/node_modules/webpack/lib/cli.js:349:2)\n at WebpackCLI.getBuiltInOptions (/var/builds/zotero/src/zotero-client/note-editor/node_modules/webpack-cli/lib/webpack-cli.js:777:47)\n at makeCommand (/var/builds/zotero/src/zotero-client/note-editor/node_modules/webpack-cli/lib/webpack-cli.js:907:32)\n at <anonymous>\n at process._tickCallback (internal/process/next_tick.js:188:7)\nnpm ERR! code ELIFECYCLE\nnpm ERR! errno 2\nnpm ERR! zotero-note-editor@1.0.0 build: `webpack --node-env production`\nnpm ERR! Exit status 2\nnpm ERR! \nnpm ERR! Failed at the zotero-note-editor@1.0.0 build script.\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR! /home/USER/.npm/_logs/2023-02-03T15_05_24_568Z-debug.log\n' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zotero@5.0.0 build: `node ./scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zotero@5.0.0 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! /home/USER/.npm/_logs/2023-02-03T15_05_43_175Z-debug.log
==> ERROR: A failure occurred in build().
Aborting...
then, with the same but suppresing the space after the equal sign, as in NODE_OPTIONS=npm run build
, I got:
==> Starting build()...
/var/builds/zotero/PKGBUILD: line 99: run: command not found
==> ERROR: A failure occurred in build().
Aborting...
Finally, only by suppressing NODE OPTIONS=...
altogether, as previously suggested by @avemilia (2022.11.13), could I build, enter fakeroot, ..., and install.
I got the node: --openssl-legacy-provider is not allowed in NODE_OPTIONS
error too. replacing the line
NODE_OPTIONS=--openssl-legacy-provider npm run build
with
NODE_OPTIONS= npm run build
made it work for me with none of the other changes recommended below. we'll see if that breaks something in the program when I'm using it, but it looks good so far.
That gives
node: --openssl-legacy-provider is not allowed in NODE_OPTIONS
UPD: removing NODE_OPTIONS
fixed the build.
Following peippos workaround I still get an error message aborting the install:
curl: (92) HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR (err 2)
==> ERROR: A failure occurred in prepare().
Aborting...
error: failed to build 'zotero-6.0.18-1':
error: packages failed to build: zotero-6.0.18-1
Any ideas for a fix?
To work around the build failures reported by @petronny and @MangoMan, add a line
export NODE_OPTIONS=--openssl-legacy-provider
to the beginning of build()
.
(The pdf.js seems to pin versions of node modules that do not support openssl>=3)
[02:38:05] Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:140:10)
at BulkUpdateDecorator.hashFactory (/build/zotero/src/zotero-client/pdf-reader/pdf.js/node_modules/webpack/lib/util/createHash.js:144:18)
at BulkUpdateDecorator.update (/build/zotero/src/zotero-client/pdf-reader/pdf.js/node_modules/webpack/lib/util/createHash.js:46:50)
at RawSource.updateHash (/build/zotero/src/zotero-client/pdf-reader/pdf.js/node_modules/webpack-sources/lib/RawSource.js:64:8)
at NormalModule._initBuildHash (/build/zotero/src/zotero-client/pdf-reader/pdf.js/node_modules/webpack/lib/NormalModule.js:753:17)
at handleParseResult (/build/zotero/src/zotero-client/pdf-reader/pdf.js/node_modules/webpack/lib/NormalModule.js:817:10)
at /build/zotero/src/zotero-client/pdf-reader/pdf.js/node_modules/webpack/lib/NormalModule.js:908:4
at processResult (/build/zotero/src/zotero-client/pdf-reader/pdf.js/node_modules/webpack/lib/NormalModule.js:640:11)
at /build/zotero/src/zotero-client/pdf-reader/pdf.js/node_modules/webpack/lib/NormalModule.js:692:5
[02:38:05] 'generic-legacy' errored after 2.72 s
Full build log: https://github.com/arch4edu/cactus/actions/runs/3398333995/jobs/5651286315
Pinned Comments
agkphysics commented on 2023-06-14 11:31 (UTC)
@jeyes https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot
agkphysics commented on 2023-02-08 10:12 (UTC)
If people are having issues, try building with
extra-x86_64-build
in a clean chroot.