ensdomains / subdomain-registrar

A registrar that sells subdomains to users on behalf of their owners
BSD 2-Clause "Simplified" License
185 stars 166 forks source link

can't install #143

Open okwme opened 2 years ago

okwme commented 2 years ago

i've been running into the dreaded node-gyp errors all day. After re-installing a number of different versions of node i've gotten to a new install error: git dep preparation failed and npm ERR! The git reference could not be found.

Would be great to have the versions of node and npm specified in package.json or other explicit versioning so that the repo installs as expected. I've received the same errors from the github dev environments that should be expected to be a little more consistent than my personal dev env. Still even if the code is old I'd hope the version control was working. Any ideas what I've got misconfigured?

okwme commented 2 years ago

update:
changing node-sass from^4.5.3 to ^6.0.0 got rid of the node-gyp error.

okwme commented 2 years ago

ok nm errors are back when @ensdomains/ethregistrar is included. However that repo says it's been deprecated for @ensdomains/ens-contracts so we'll see if that has the same outdated version of node-sass that is causing all the problems.

okwme commented 2 years ago

seems ok but need to find and replace all the occurrences of @ensdomains/ethregistrar/contracts with @ensdomains/ens-contracts/contracts/ethregistrar. Noted is that OldBaseRegistrarImplementation.sol is missing which is imported as EthRegistrar in a number of tests.

okwme commented 2 years ago

maybe the final node-gyp make error still turning up seems to be a result of "truffle-default-builder": "^2.0.0" which doesn't seem to be present in the project at all despite being in the dependencies of the package.json. It seems this package is unnecessary? It is relevant to truffle 1-3 and we're using truffle 5? But only for front end development? Can't quite tell but once removed npm i works!

There's an error with compiling and deploying contracts due to some pragmas stipulating solidity ^0.8.4 while solc is set to 0.5.16 (my local settings maybe?). solc versions should be explicitly set in the project so that the correct one is used too.

But this is progress!

okwme commented 2 years ago

hmm maybe the solc problem is because i'm importing from ens-contracts now which seem to use 0.8.4... how to fix this?

okwme commented 2 years ago

truffle 5.2.0 allows for the solc version to be set as pragma (see here) although i still get the following error:

Error: Could not find a single version of the Solidity compiler that satisfies the following semver expressions obtained from your source files' pragma statements: ^0.5.0 - ^0.8.4 - ^0.5.0 - ^0.5.0 - >=0.4.24 - ^0.5.0 - ^0.5.0.

I guess the compiler still needs to be consistent across imported files...

okwme commented 2 years ago

working from here in case anyone is interested: https://github.com/folia-app/subdomain-registrar

okwme commented 2 years ago

ok i imported all the old solc versions of ethregistrar directly into the repo and i'm able to compile!

matbee-eth commented 2 years ago

How did it end up working for you @okwme ?