TypeError: Cannot destructure property ‘…’ of ‘useLoaderData(…)’ as it is null.
React web applications (Next.js, Remix) use React hooks to transfer data between the server side and browser side code. Remix uses the loader() function to run code on the server to produce data for the web page, and the instruction in the browser…
Migrating a Next.js web application to Remix
Application configuration At this point Remix version 1 is “forward compatible”. It already contains the version 2 features, and you can start to use them before the official release. To enable the version 2 features in version 1 Migration…
Cannot edit table rows in pgAdmin 4
If the table has no primary key, pgAdmin 4 cannot identify them, so disables the row insert and edit. Lock icons appear next to the column names, and the Add row button is disabled. To be able to edit table rows in pgAdmin4, select the primary key column…
How to expose Next.js environment variables to the browser specific code
The Next.js React web application runs separate code on the server and in the browser. By default, the environment variables are only accessible in the server side script. Warning: by exposing environment variables to the browser code you may reveal…
Error: Cannot find module ‘…’ outside of the development environment
When the Node.js application runs correctly in the development environment, but throws the following error in higher environments: Error: Cannot find module ‘…’ Make sure the module is not listed in the “devDependencies”…
React Developer Tools
Download the React Developer Tools for the browser you use from https://react.dev/learn/react-developer-tools
error: INSERT has more expressions than target columns
When the parameterized PostgreSQL statement has more elements in the “VALUES” option than the number of columns specified, we get the error message: error: INSERT has more expressions than target columns In the sample code below there are two…
error: could not determine data type of parameter $1
For security reasons we should always use parameterized queries to avoid SQL injections through parameters. The usual format is When a PostgreSQL command runs and a parameter is not used, we get the error message error: could not determine data type of…
How to disable static page generation during Next.js site build
If your Next.js React TypeScript web application uses database calls to display data on the pages, and during build time the database is not available, we need to disable the static page generation, otherwise we get the following error: info Generating…
How to disable linting during React Next.js Node.js application build
If your application is in the proof of concept phase, it works and you just want to build it, you can disable the linting process to have a successful build regardless of linting errors.