I'm getting erros when I try to build "Zotero PDF/EPUB/HTML reader and annotator" from the source code.

58 views
Skip to first unread message

Gabriel

unread,
Dec 20, 2023, 7:53:54 PM12/20/23
to zotero-dev
System info:
- OS: Windows 11 22H2
- Node: v20.10.0 (I previously tried with v18.17.1)

Description:
I'm following the instructions found in https://github.com/zotero/reader but whenever I try to run "NODE_OPTIONS=--openssl-legacy-provider npm i" and  "NODE_OPTIONS=--openssl-legacy-provider npm run build" the terminal returns an error saying that "NODE_OPTION  is not recognized as an internal or external command, operable program or batch file".

Can anyone help me?


Dan Stillman

unread,
Dec 20, 2023, 7:56:31 PM12/20/23
to zoter...@googlegroups.com
It would be NODE_OPTIONS, not NODE_OPTION, but you'd want to be doing this from an actual Linux/Unix-style terminal (git bash, Cygwin, WSL, etc.). It might be possible to set environment variable from the Windows command prompt, but we can't help with that.

Gabriel

unread,
Dec 22, 2023, 5:51:20 PM12/22/23
to zotero-dev
Thank you!
I activated WSL 2 + Ubuntu 22.04 and this specific error was solved, however, the terminal throwed the following errors:

"npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     '\\\\wsl.localhost\\Ubuntu-22.04\\home\\gabriel\\reader\\node_modules\\@webassemblyjs',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir '\\wsl.localhost\Ubuntu-22.04\home\gabriel\reader\node_modules\@webassemblyjs'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: '\\\\wsl.localhost\\Ubuntu-22.04\\home\\gabriel\\reader\\node_modules\\@webassemblyjs'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     '\\\\wsl.localhost\\Ubuntu-22.04\\home\\gabriel\\reader\\node_modules',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir '\\wsl.localhost\Ubuntu-22.04\home\gabriel\reader\node_modules\@jridgewell\source-map\node_modules'] {  
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: '\\\\wsl.localhost\\Ubuntu-22.04\\home\\gabriel\\reader\\node_modules\\@jridgewell\\source-map\\node_modules'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     '\\\\wsl.localhost\\Ubuntu-22.04\\home\\gabriel\\reader\\node_modules\\tsd-jsdoc',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir '\\wsl.localhost\Ubuntu-22.04\home\gabriel\reader\node_modules\tsd-jsdoc\node_modules\typescript\loc\lcl'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: '\\\\wsl.localhost\\Ubuntu-22.04\\home\\gabriel\\reader\\node_modules\\tsd-jsdoc\\node_modules\\typescript\\loc\\lcl'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     '\\\\wsl.localhost\\Ubuntu-22.04\\home\\gabriel\\reader\\node_modules\\eslint-plugin-react',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir '\\wsl.localhost\Ubuntu-22.04\home\gabriel\reader\node_modules\eslint-plugin-react'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: '\\\\wsl.localhost\\Ubuntu-22.04\\home\\gabriel\\reader\\node_modules\\eslint-plugin-react'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code EISDIR
npm ERR! syscall symlink
npm ERR! path \\wsl.localhost\Ubuntu-22.04\home\gabriel\reader\epubjs\epub.js
npm ERR! dest \\wsl.localhost\Ubuntu-22.04\home\gabriel\reader\node_modules\epubjs
npm ERR! errno -4068
npm ERR! EISDIR: illegal operation on a directory, symlink '\\wsl.localhost\Ubuntu-22.04\home\gabriel\reader\epubjs\epub.js' -> '\\wsl.localhost\Ubuntu-22.04\home\gabriel\reader\node_modules\epubjs'

npm ERR! A complete log of this run can be found in: C:\Users\Gabriel\AppData\Local\npm-cache\_logs\2023-12-22T21_45_28_591Z-debug-0.log

> pdf-r...@2.0.0 build
> npm run build:pdf.js && npm run build:reader

'\\wsl.localhost\Ubuntu-22.04\home\gabriel\reader'
CMD.EXE foi iniciado tendo o caminho acima como pasta atual.
Não há suporte para caminhos UNC. Padronizando para pasta do Windows.
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Windows\package.json
npm ERR! errno -4058
npm ERR! enoent Could not read package.json: Error: ENOENT: no such file or directory, open 'C:\Windows\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent" 

Can anyone help me?

I'm actually trying to understand how to create highlights and annotations in PDF files and, as I didn't find any documentation, I believe I can study Zotero's source code instead. Can you please give directions about that? Will I find all the neccessary information in the "Zotero PDF/EPUB/HTML reader and annotator" repo?

Reply all
Reply to author
Forward
0 new messages