How to create sfc package using vite for vuejs on GitHub package registry? - github

I want to create a monorepo of private package using vite (vueJS) in GitHub package registry.
Any npm package suggestion for it please?

Yes, there is.
You can use: npm: vue-sfc-vite or github: #afzalsabbir/vue-sfc-vite and you can take help of lerna.
To create monorepo using lerna: Follow the steps here: Github NPM Package Registry > Publish

Related

Github Actions cannot find NuGet package hosted in GitHub Packages

I have a GitHub organisation set up and within that are two private repositories: Library and App. I have managed to configure a GitHub Action for the Library repository to create a NuGet package and push it to nuget.pkg.github.com. I added the Library package as a dependency to the App project and can fetch these locally using a configured Personal Access Token. I am now working on the GitHub Action to build and run unit tests on the App project.
I have added a step to the workflow to add the NuGet package source
- name: Set package source
run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/REDACTED/index.json"
This is exactly the same line as is used when pushing the package, but when I reach the dotnet restore step later I get the following error:
/home/runner/work/App/App/App.Services/App.Services.csproj : error NU1101:
Unable to find package Library. No packages exist with this id in source(s): github, nuget.org [/home/runner/work/App/App/App.sln]
I understand that it is likely possible to work around this by adding a new Personal Access Token to the secrets of the App repository, but would prefer to rely on GITHUB_TOKEN if possible for both the security and management benefits.
According to GitHub, installing packages hosted with GitHub Packages requires minimal configuration using GITHUB_TOKEN. And by default, GITHUB_TOKEN has both read and write permissions for packages.
This question is different from this one as that relates to an issue with empty NuGet.config files which has since been resolved.
I hit the same problem, GITHUB_TOKEN can be used to push packages but not pull packages from other repos within the same organisation. This thread has a lot of people complaining about it: https://github.com/actions/setup-node/issues/49. I was unable to get any of the workarounds there working for me, and had no option in GitHub to grant specific permissions to repositories in the organisation for packages. Had to use a PAT in the end.

Vercel not deolpying on github repo

I am using vercel to deploy and I am getting this error, Jem and lib are both local packages that are installed like so "jem": "file:../lib", and "lib": "file:../lib",. this is my vercel settings. This is working on my local deployment with the vercel cli but not working when I use the Github production. any help would be great. Not I am using svelte.
You need to install types for libraries you install. Try this:
npm install #types/jem

How can I install a subfolder of a github repository using yarn?

I'm trying to add a library as a dependency to a project.
This library is setup in a fairly peculiar way, with this file structure
package.json
library/
package.json
in /package.json the name is just parent-folder, while in /library/package.json the name is library-name.
On npm it's also published as library-name.
What I'm trying to do is creating my own fork and installing this library using yarn without release a npm package.
Is this possible? How can you achieve this?

Installing public npm packages from the GitHub package registry

1.I publish a public package in an organization repo.
The repo link : https://github.com/JX3BOX/jx3box-config/packages/141887
2.And I wanna install the package from another repo.
I had set the dependencies in the package.json
"dependencies": {
"#jx3box/jx3box-config": "^1.0.3",
and I created a file named .npmrc ,and set :
#jx3box:registry=https://npm.pkg.github.com
3.When I use github actions to build
There is an error occur
Running build scripts... npm install && npm run build
npm ERR! code E401
npm ERR! Unable to authenticate, need: Basic realm="GitHub Package Registry"
It means maybe I need auth.But This is an public package.Is it should be auth too?
4.Now I had to prepend a line in the file .npmrc,just like
//npm.pkg.github.com/:_authToken=<mytoken>
But how can I set it in the actions .
or because this is a public pkg,how can I don't need any auth?
Thanks a lot!! ^_^
This is probably solved but posting anyway because this question ranks high on Google.
From the GitHub Docs:
You need an access token to publish, install, and delete packages. You can use a personal access token to authenticate with your username directly to GitHub Packages or the GitHub API.[...]
You cannot install packages (even public ones) from the GitHub npm registry without being authenticated.
More details and multiple authentication methods here:
https://docs.github.com/en/packages/guides/configuring-npm-for-use-with-github-packages#authenticating-to-github-packages
The docs should be updated.
You need an access token to publish, install, and delete packages.
This should really be changed to;
You need an access token to publish, install, and delete both private and public packages.

How to publish a nuget package privately using Nuget Gallery

I have created a nuget package and I want to share it with my team using Nuget Gallery.
I need to publish the nuget package privately.
So I have managed to build the Nuget Gallery from Nuget Gallery build steps
When I run the build, Google Chrome shows up with "localhost" website address showing Nuget Gallery.
1) How do I add the nuget package that I have created recently to the local Nuget Gallery?
2) How do I publish the Nuget Gallery and share with my team after I have managed to add nuget package in that gallery?
Thanks
You can also create your own Nuget server running in your local network by using the Microsoft NuGet.Server available in nuget.org ;-)
If you haven't seen it already, have a look at the docs on hosting a private nuget feed. TeamCity has a NuGet feed built-in, so you may not need to host a NuGetGallery yourself.
Depending on where/how you host your private feed, it might have a UI that you can use to upload packages (such as the NuGet Gallery). But if you're creating packages as part of a CI pipeline, it's probably easier to just use nuget push and use the -Source parameter to specify which source you want to push to, assuming your nuget.config has more than once source defined.