Web Development

Creating new TypeScript types using template literal types

TypeScript is way more powerful than I give it credit for. I recently learned about creating new TypeScript types using…

1 year ago

React TypeScript: Simplify Imports with Path Aliases

As codebases grow larger and more complex in structure, imports can become unmanageable. As more directories are added, imports become…

1 year ago

Fix Cannot find module ‘fs’ or its corresponding type declarations.ts(2307)

I recently ran into the error "Cannot find module 'fs' or its corresponding type declarations.ts(2307)" while I was using VSCode…

1 year ago

Why should we not use index as key in React Lists

When working with React, developers often come across the need to render lists of items efficiently. Every item in a…

1 year ago

Partial Matching in Jest

Jest has the ability to check for partial matches on arrays and objects. Let us see how to do partial…

1 year ago

JSON.parse(): Fixing ‘SyntaxError: “[object Object]” is not valid JSON’

SyntaxError: "[object Object]" is not valid JSON: usually happens when the value being passed to JSON.parse is not a string…

1 year ago

Fixing “error: cannot find module semver” error in Node.js

When installing a package using npm, you might encounter the "error: cannot find module semver" error. + npm install ...…

1 year ago

Fix “Error:0308010C:digital envelope routines::unsupportedFixing” in Node.js

Node 17 introduced OpenSSL v3.0, which brought in some breaking changes, and the "Error: error:0308010C:digital envelope routines::unsupported" is a result…

1 year ago

Fixing “node: –openssl-legacy-provider is not allowed in node_options” error

I recently ran into the "node: --openssl-legacy-provider is not allowed in node_options" error while working with Node 17. It occurs…

1 year ago

JavaScript: fix “SyntaxError: cannot use import statement outside a module”

I recently was working with a third-party library. I ran into the error "Uncaught SyntaxError: cannot use import statement outside…

1 year ago
Advertisements