unable to get local issuer certificate error with yarn install from a private npm repository (such as JFrog), you can try running this command: yarn config set “strict-ssl” false yarn install Error message example error An unexpected error occurred: “https://npco.jfrog.io/artifactory/api/npm/npm-mdh/@mdh/my-library/-/@mdh/my-library-3.21.0.tgz: unable to get local issuer certificate”.
When you want to specify which Node version to use in your Github Actions, you can use actions/setup-node@v2. The alternative way is to use a node container. When you try to use a publicly available node container like runs-on: node:alpine-xx, the pipeline gets stuck in a queue. runs-on is not …
1. Make sure to have the correct name value for the module in package.json. Include a prefix if it is necessary like this, “name”: “@mdhnpm/react-cube-loading-spinner” 2. Make sure to add publishConfig in package.json “publishConfig”: { “registry”: “https://registry.npmjs.org/” }, 3. Do not set “private”: true if you want to publish the …
There are many ways to handle authorisation with Apollo. Authorisation is the process to determine if the authenticated user has access rights for the particular resources while authentication is to confirm the user’s identity. In short, my recommendation is (5), by using graphql-shield. You can also check the code example …
If you want to look beyond authentication and authorisation to protect your GraphQL APIs, there are a few Node.js libraries you can have a look at. 1. Implementing Rate-Limiting Protection Rate-limiting will prevent too many requests coming in at once. For this, you can start with looking at graphql-rate-limit-directive. It …
Here is the quick Node.js example of interacting with a rest API endpoint that takes XML string as a payload and return with XML string as response. Once we get the response, we will convert it to a JSON object. For this example, we will use the old-school QAS (Quick …
I created a node module to retrieve multiple parameters as the parameterName-parameterValue Json object from AWS Parameter Store. It is called aws-ssm-parameters and is available from Npm. The module is namespaced. So, you need to add the namespace @mdhnpm when you install it. npm i @mdhnpm/aws-ssm-parameters The main motivation for creating …
AWS Lambda function allows you to run a piece of code in a serverless manner. All you need to do is to upload your function to the cloud. It sounds easy. The problem is that the function seldom runs on its own. Most of the time, it is only useful …
There are a few tools available to help you to write quality code. In this post, we will show you how to set up Node.js project with EditorConfig and ESLint. EditorConfig is currently one of the most popular tools to maintain consistent coding styles between different editors or IDEs (for …
It is universally acknowledged that setting up a local dev environment is hard work. Especially for javascript frameworks that get constantly updated. The documentation for the older version suddenly stops working and you have to make sure you are installing the correct versions. In this post, I will show you …