ipfs-shipyard / npm-on-ipfs

:package: Install npm modules through IPFS!
MIT License
468 stars 40 forks source link

yarn-ipfs is incompatible with yarn #122

Open NatoBoram opened 4 years ago

NatoBoram commented 4 years ago

Hello!

When I install packages via yarn, I get the following output in my yarn.lock.

# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1

"@angular-devkit/architect@0.803.20":
  version "0.803.20"
  resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.803.20.tgz#792093259d69012c0763aa9176181b255d8795c8"
  integrity sha512-NjyDJ61i9kh8J+qXt0E2j+P5Xsmi2mPasBzwcQyrZZGiho4zC0IFxcdxyzcsXFEupmilJKkjdt2g4QQRC5rUDQ==
  dependencies:
    "@angular-devkit/core" "8.3.20"
    rxjs "6.4.0"

"@angular-devkit/build-angular@~0.803.20":
  version "0.803.20"
  resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-0.803.20.tgz#b19b0d82c75cbdd939b589a33ccb60e2c9f6eec9"
  integrity sha512-JDZkZjOqPbOtCMsSKxQf9C+uSTZ7fQGlKGsCpJMzfa4iQ0WrmrhZvnRKQeEpMTTZTpuou/HQeQjyDV+Sx3yumw==
  dependencies:
    "@angular-devkit/architect" "0.803.20"

However, if I use ipfs-yarn, I get this result.

# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# yarn v1.10.0-0
# node v13.2.0

object:
  "@angular-devkit/architect@0.803.20":
    version "0.803.20"
    resolved "https://registry.js.ipfs.io/@angular-devkit/architect/-/architect-0.803.20.tgz#792093259d69012c0763aa9176181b255d8795c8"
    integrity sha512-NjyDJ61i9kh8J+qXt0E2j+P5Xsmi2mPasBzwcQyrZZGiho4zC0IFxcdxyzcsXFEupmilJKkjdt2g4QQRC5rUDQ==
    dependencies:
      "@angular-devkit/core" "8.3.20"
      rxjs "6.4.0"
  "@angular-devkit/build-angular@~0.803.20":
    version "0.803.20"
    resolved "https://registry.js.ipfs.io/@angular-devkit/build-angular/-/build-angular-0.803.20.tgz#b19b0d82c75cbdd939b589a33ccb60e2c9f6eec9"
    integrity sha512-JDZkZjOqPbOtCMsSKxQf9C+uSTZ7fQGlKGsCpJMzfa4iQ0WrmrhZvnRKQeEpMTTZTpuou/HQeQjyDV+Sx3yumw==
    dependencies:
      "@angular-devkit/architect" "0.803.20"

This makes ipfs-yarn completely incompatible with yarn. Ideally, only the resolved property would change and yarn would be able to use a public gateway to fetch the files specified in its lockfile if the user doesn't have ipfs-yarn installed. That public gateway could be specified by the project's local .ipfs-npmrc. I would include ipfs-npm in devDependencies to fetch the project's dependencies using ipfs-yarn, but that's impossible because ipfs-npm depends on node-gyp, which is a severe handicap (please see #121).