首页 > 解决方案 > Deploying Angular Component Library to Github Pages Only absolute URLs are supported

问题描述

I am following a tutorial about building a Angular component Library and publishing it to Github pages.

https://dev.to/brgrz/create-a-library-with-angular-and-publish-it-to-github-package-registry-1pch

At the end, after finishing everything else when I publish my library I get an error that I do not understand.

'Only absolute URLs are supported'

This is github repo https://github.com/uweDuesing/mapStuff

Looking into the verbose error log:

18 verbose stack TypeError: Only absolute URLs are supported
18 verbose stack     at getNodeRequestOptions (/home/uwe/.nvm/versions/node/v10.19.0      /lib/node_modules/npm/node_modules/node-fetch-npm/src/request.js:131:11)
18 verbose stack     at fetch.Promise (/home/uwe/.nvm/versions/node/v10.19.0/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:44:21)
18 verbose stack     at new Promise (<anonymous>)
18 verbose stack     at fetch (/home/uwe/.nvm/versions/node/v10.19.0/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:41:10)
18 verbose stack     at retry (/home/uwe/.nvm/versions/node/v10.19.0/lib/node_modules/npm/node_modules/make-fetch-happen/index.js:332:14)
18 verbose stack     at /home/uwe/.nvm/versions/node/v10.19.0/lib/node_modules/npm/node_modules/promise-retry/index.js:29:24
19 verbose cwd /home/uwe/projects/mapStuff/dist/map-stuff
20 verbose Linux 5.3.0-51-generic
21 verbose argv "/home/uwe/.nvm/versions/node/v10.19.0/bin/node" "/home/uwe/.nvm/versions/node/v10.19.0/bin/npm" "publish"
22 verbose node v10.19.0
23 verbose npm  v6.13.4
24 error Only absolute URLs are supported

I am sorry for the slightly vague question - but I do not even know where to start asking the right thing!

Thanks for the help, Uwe

标签: angular

解决方案


毕竟我遇到的所有问题都是由我的用户文件夹中的 .npmrc 文件中的值不正确引起的。gthub npm 注册表的 url 已损坏

https://npm.pkg.github.com/

我真的很傻,但这就是饼干有时会碎的方式。


推荐阅读