Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot resolve git dependencies #36

Open
evanjs opened this issue Aug 17, 2021 · 1 comment
Open

Cannot resolve git dependencies #36

evanjs opened this issue Aug 17, 2021 · 1 comment

Comments

@evanjs
Copy link

evanjs commented Aug 17, 2021

I have a project that utilizes @biesbjerg/ngx-translate-extract and one of the dependencies sometimes references a git commit (github:lenchvolodymyr/flat#ffe77ef).

This is a development dependency, but the below specification in package-lock.json causes the build to fail, as git is not in the PATH, and there is no network access, anyway.

node_modules/@biesbjerg/ngx-translate-extract:
"node_modules/@biesbjerg/ngx-translate-extract": {
      "version": "4.2.0",
      "resolved": "http://172.16.0.208:8080/nexus/repository/npm/@biesbjerg/ngx-translate-extract/-/ngx-translate-extract-4.2.0.tgz",
      "integrity": "sha512-MY33zFNqlZFPv4RU5rCdyuvINwmwhWcGrxYy0MoiXsqLkqoly4xCt7cJhdSh3XhTi85dDi//hGynxGc5WzXnbA==",
      "bundleDependencies": [
        "flat"
      ],
      "dev": true,
      "license": "MIT",
      "dependencies": {
        "@angular/compiler": "^8.2.6",
        "@phenomnomnominal/tsquery": "^3.0.0",
        "boxen": "^4.1.0",
        "colorette": "^1.1.0",
        "flat": "github:lenchvolodymyr/flat#ffe77ef",
        "gettext-parser": "^4.0.2",
        "glob": "^7.1.4",
        "mkdirp": "^0.5.1",
        "path": "^0.12.7",
        "terminal-link": "^2.0.0",
        "typescript": "^3.6.3",
        "yargs": "^14.0.0"
      },
  ...
Error produced by nix-npm-buildpackage:
frontend> building npm cache
frontend> building node_modules
frontend> npm ERR! code ENOENT5mextract run-parallel@1.2.0 extracted tK
frontend> npm ERR! syscall spawn git
frontend> npm ERR! path git
frontend> npm ERR! errno ENOENT
frontend> npm ERR! enoent Error while executing:
frontend> npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/lenchvolodymyr/flat.git
frontend> npm ERR! enoent
frontend> npm ERR! enoent
frontend> npm ERR! enoent spawn git ENOENT
frontend> npm ERR! enoent This is related to npm not being able to find a file.

Furthermore, the package-lock.json seems to reference the dependency regardless of NODE_ENV (e.g. prod), npm i --only-prod, etc., so I am having issues directing it to a non-git commit to work around this issue.

If there is a way to do so with the current state of the repository, that would be helpful at this point.

Not sure how much work it would take to support fetching node dependencies from git repositories, assuming it is not supported at the moment, as this issue seems to indicate.

@evanjs
Copy link
Author

evanjs commented Aug 17, 2021

Oops. Did not see #34.
It doesn't seem to work with the PR just yet, however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant