angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng add github repository

Open boulix3 opened this issue 8 years ago • 5 comments

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ X] feature request

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [X ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

node 8.1.1 npm 5.6.0 Windows 10

Repro steps

ng add https://github.com/boulix3/store-builds doesn't work npm i https://github.com/boulix3/store-builds installs the package from github

The log given by the failure

  • Using owner/repo-name
λ ng add boulix3/store-builds
Installing packages for tooling via npm.
npm ERR! code E404
npm ERR! 404 Not Found: boulix3@latest
  • Using another syntax compatible with npm install
λ ng add git+https://github.com/boulix3/store-builds
Installing packages for tooling via npm.
npm ERR! Error while executing:
npm ERR! C:\softs\cmder\vendor\git-for-windows\cmd\git.EXE ls-remote -h -t https:
npm ERR!
npm ERR! ssh: Could not resolve hostname https: Name or service not known
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128

I've also tried the various syntaxes to add a package listed in this documentation page https://docs.npmjs.com/cli/install such as git:// etc...

Desired functionality

It would be nice to be able to install a package from github and execute the ng-add schematic.

Mention any other details that might be useful

I seems to me that when the ng add command passes the package name to npm, it splits on '/' and only takes the first item (boulix3 the first example, and https: in the second) and passes it to npm.

boulix3 avatar Sep 13 '18 13:09 boulix3

For information, here is the workaround I use

npm i owner/repo-name
ng g package-name:ng-add

boulix3 avatar Sep 13 '18 14:09 boulix3

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

Find more details about Angular's feature request process in our documentation.

angular-robot[bot] avatar Feb 01 '22 18:02 angular-robot[bot]

Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

You can find more details about the feature request process in our documentation.

angular-robot[bot] avatar Feb 21 '22 13:02 angular-robot[bot]

Thanks for reporting this issue. Luckily, it has already been fixed in one of the recent releases. Please update to the most recent version to resolve the problem.

If the problem persists in your application after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. You can use ng new repro-app to create a new project where you reproduce the problem.

alan-agius4 avatar Jan 09 '25 14:01 alan-agius4

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.