R
R
rPman2021-11-19 21:58:12
linux
rPman, 2021-11-19 21:58:12

How can I solve node-re2 or node-gyp dependency problem?

I didn’t write electron applications, and I didn’t work much with node (only my own projects, I didn’t look far into dependencies) and for me a lot of things are not clear, it’s even shocking what the development of modern applications has become.

I'm trying to build an idena-desktop electron, a simple web form, a simple image editor, the main functionality is served by another application with rpc access, no more, only 1309 modules in dependencies, little things , but in this case it doesn't matter what it is.

It has node-re2 as a dependency, and the package manager, not finding it locally, tries to first download it from github from the files built there in release, but requests a file with code 102 version 1.15.9, which does not exist there. As a result, he tries to build it using npm-gyp and does not find it either (it is also in the dependencies).

And now the most fun, I try to manually resolve and install npm-re or npm-gyp using the apt package manager, then he tries to remove nodejs and install libnode64 (they have it so written), respectively, if allowed, he succeeds, but then it logically stops work node and npm in principle.

If I understand correctly, this is a bug in the https://deb.nodesource.com/node_17.x repository? If you install node-gyp globally using npm install -g node-gyp, then everything seems to be working, but as a result, the assembler still does not see node-gyp and cannot build anything (by the way, it does not even try to build the project further, it just writes that re2 was not found), or I don’t know what and where else I need to tweak for this.

The developers of this case themselves are not in a hurry to help, well, I just tried it today, others didn’t help on the off channel in the discord either, I responded only to complain that I also didn’t master it. There is the same garbage with their idena-indexer, you can collect FIG, namely this software collects the necessary information on the blockchain (details about mining and validation), for example, to analyze the blockchain (raise your explorer)

details
ubuntu 20.04

# npm --version
8.1.0
# node -v
v17.0.1

# git clone https://github.com/idena-network/idena-desktop/
# git checkout tags/v0.28.1

# export NODE_OPTIONS=--openssl-legacy-provider
# npm install
...
added 2345 packages, and audited 2346 packages in 3m
...
не запускать npm audit fix --force в офф дискорде писали что этот механизм уже давно сломан (жесть, финансовые приложения пишут при наличии 17-и критических уязвимостей)

# npm run dist:linux
...
Error occurred prerendering page "/oracles/view". Read more: https://err.sh/next.js/prerender-error
Error: Cannot find module './build/Release/re2'
...
Error: Export encountered errors on following paths:
/oracles/list
/oracles/new
/oracles/view

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question