… you might have mixed up default and named imports

In a Next.js React web application we can export functionality two ways:

  • As a function definition
    export function InsertDataTest(props) {
  • As an arrow function
    const SelectDataTest = () => {
    export default SelectDataTest;

The two definitions have to be imported with two different syntaxes

  • Use the named import for function definitions
    import { InsertDataTest } from './_insertDataTest';
  • Use the default import for arrow functions
    import SelectDataTest from './_selectDataTest';

If we try to use the wrong import statement, we get the following error message: 

Unhandled Runtime Error
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `Index`.

Make sure your import statement matches the definition format.

The top-level-await experiment is not enabled

When we try to call an async function with await from a .tsx file in a Next.js React TypeScript web application we get the error message:

Module parse failed: The top-level-await experiment is not enabled (set experiments.topLevelAwait: true to enabled it)
Error: The top-level-await experiment is not enabled (set experiments.topLevelAwait: true to enabled it)

The new versions of Next.js comes with Webpack 5, which supports top level await, but we need to enable it for Next.js too.

  • Open the next.config.js file in the root directory of your Next.js React TypeScript web application
  • Add the following section to it
module.exports = {
  webpack: (config) => {
    config.experiments = { ...config.experiments, topLevelAwait: true };
    return config;

Module not found: Can’t resolve ‘fs’

If you use Webpack version 5 or later you may encounter the error message

Module not found: Can’t resolve ‘fs’

The cause is, that Webpack 5 has a breaking change, and the “fs” module is most likely not included anymore in the client-side code.

To eliminate the issue, add the “browser” element to the package.js file under dependencies:

  "dependencies": {
  "browser": {
    "fs": false,
    "os": false,
    "path": false

If the error persists, add the “fs”, “os” and “path” elements to the fallback element in the webpack.config.js file:

module.exports = function (webpackEnv) {
  return {
    resolve: {
      fallback: {
        "fs": false,
        "os": false,
        "path": false,

Linking between pages in multi page Next.js React web applications

The Next.js React sample project only contains a single “Index” page. If your web site has multiple pages, you need to set up simple routing to call them from each other.

In this example we will use the “Link” Next.js React component to call two pages from each other with the minimum number of instructions using TypeScript.

Create the pages

File location

For automatic routing we need to place our pages into the “pages” directory. We can use nested folders, but in that case the call has to include the folder name too.

File locationURL
pages/index.tsx/ (index is the default file in every directory)
pages/company/index.tsx/company (index is the default file in every directory)


  • Import the “Link” React component. It will automatically generate the URL to the referenced page,
  • “export” the function to make it available for routing,
  • Use the “<Link href=>” element to specify the target page hyperlink,
  • {/* */} is the comment block in React,
  • We use the .tsx file extension in our TypeScript applicaiton.

The code

This is the minimum code you need to call a page within your Next.js React web application.

The “pages/contact.tsx” file

// Import the Link component from next/link
import Link from 'next/link'

// Export the function to make it available to other modules
export default function Contact() {
  return (
    {/* Text on the page. */}
    This is the Contact page.<br/>
    {/* The link to the other page */}
    <Link href="/about">About</Link>

The “pages/about.tsx” file

// Import the Link component from next/link
import Link from 'next/link'

// Export the function to make it available to other modules
export default function About() {
  return (
    {/* Text on the page. */}
    This is the About page.<br/>
    {/* The link to the other page */}
    <Link href="/contact">Contact</Link>

How to name individual street segments in Cities: Skylines

The Cities: Skylines AI automatically estimates the length of the street, and the name applies to the entire length. In real life after a turn, a corner, or an intersection the street’s name can change.

To adjust the street segment where the name applies:

  • Click the name of the street and select the Adjust Road icon
  • Click the segment you want to name, and the small dot will appear
  • Move the end of the original segment to designate the new street segment. The large dot will jump through the turns and intersections.

How to tow a trailer if a loading crane is installed in SnowRunner

If a loading crane is installed on the truck, it usually you cannot attach a trailer. You can tow the trailer with the winch, but you have to load the trailer yourself, as the automatic loading only works with attached trailers.

At the pickup location

  • Auto load the light cargo to your truck (bricks),
  • Transfer the cargo to the trailer with the loading crane,
  • Auto load the heavy cargo (metal beams) to your truck and pack it,
  • Tow the trailer with the winch to the destination.

At the destination

  • Release the winch to park the trailer at a convenient location close to the loading dock where you can later park next to it with the truck,
  • Unload the heavy cargo from your truck,
  • Transfer the light cargo from the trailer to your truck,
  • Pack the cargo, otherwise you cannot auto unload it,
  • Drive the truck to the unload ramp,
  • Unload the cargo from the truck

SnowRunner configuration

If you experience pauses in the video try to change the following video settings:

  • Display Mode
    • Try Borderless on multi-monitor setups. It runs the game in a window, but looks like full screen. You can easily move the mouse between monitors for multitasking.
    • Fullscreen may give you more resources, try it if borderless gives you lag.
  • Antialiasing – OFF
  • Sharpening – OFF
  • Visual Quality Preset – High

SnowRunner – Michigan, USA (spoiler)

Black River

WarehouseBricks (1 unit)
Concrete blocks (1 unit)
Service spare parts (1 unit)
Metal beams (2 unit)
Pipe DreamHeavy Fuel Tanker Semi-Trailer

Bricks x2 (1 unit)

Metal Beams x1 (2 units)

Fuel trailer notes:
When you arrive to the factory with the fuel trailer fill up your truck from it and park the fuel trailer anywhere in the factory. It will disappear when the rest of the goods are delivered and the contract completed.

Bricks, Metal beams notes:
There is a 2 unit trailer in the warehouse. You can deliver the bricks and the beams at the same time. See How to tow a trailer if a loading crane is installed in SnowRunner if you cannot attach a trailer to the truck because you have a loading crane installed.
Not a drillMetal beams x2 (2 units each)

Oil Rig Drill x1 (5 units)

Construction rig semi-trailer (high saddle needed)

Service site in Smith Dam

Drilling siteUse a trailer to carry both beams at the same time.

Smithville Dam

Service HubService spare parts (1 unit)
Oil rig drill (5 units)
Vehicle Spare Parts (1 unit)
There is a Garage North west of the Service Hub
FarmConsumables (1 unit)
North-West cornerRamped flatbed trailer with 2x steel beams(Moved to Drilling Site)
North-West cornerFlatbed trailer with 2x Vehicle spare parts(Moved to Drilling Site)
South-West WarehouseWooden planks (1 unit)
Concrete blocks (1 unit)
Metal beams (2 units)
More FuelFuel x2Drilling SiteForester’s House
Rock OnService spare parts x2Service HubRoad block next to garageThere is a Garage North west of the Service Hub
Hungry WorkersConsumables x2FarmDrilling site
Across the riverCurtainside trailerDrilling SiteSherman IslandOffroad truck is recommended
Solid foundationConcrete slabs x1Warehouse or Drilling siteNorton’s House in North-West cornerTruck with crane is recommended to pick up at Drilling Site
Threatening AccidentFuel Station at EastTruck with crane is recommended
Smithville BridgeWooden planks x2Dam
Unlucky FishermanChevrolet CK1500East of the QuarryFisherman’s House
Going UnderRescue a floating house

Drummond Island

Log StationWooden planks (1 unit)
Long logs (1 long log unit)
Close to South Fuel StationLarge concrete pieces on sideboard trailer
Cousin CletusOil barrels x2Lighthouse KeeperBring a heavy crane to pick up the first crate of barrels close to the Drummond Bridge.

The cliff above the barrels in the North-East is very high, so normally the cable of the crane cannot reach them. You need to hang the truck from the cliff. It looks like any truck and crane is fine as long as it is dangerously hanging above the void. Equipment examples: White Western Star 4964 with the yellow crane, Pacific P12 with the red Profcrane 320.
It looks like all rear or front wheels have to be in the air.

Once the barrels are on the cliff, you can pick them up with another truck.
Support local rangersWooden planks x2Log StationRanger’s Bridge
Tourist AttractionExplore Hollis IslandScout is recommended
Lost DeliverySpecial cargo x3?South-West Log stationTruck with crane recommended
Of bridges and menWooden planks x2Log StationIsland’s Bridge
Ten-HuntMetal beams x2
Concrete slab x2
Drummond Bridge

Island Lake

Hunter Bob’s BridgeWooden planks x4Log StationBob’s Bridge
No country for old truckRestore Western Star 6900 TwinSteerRepair it and fuel it up
Rusty LegacyChevrolet CK1500North-East Log StationFarmer’s houseOffroad truck is recommended
The huntsman and the carScout 800Center of the mapHunter’s ParkingOffroad truck is recommended
A little help for my frinedsReach 6 pointsScout recommended
Flaming BarrelsOil barrels

Python build error: ERROR: Could not install packages due to an OSError.

When we build a Python application Docker image using the requirements.txt file we may get the error message like this

Processing /private/var/folders/sy/f16zz6x50xz3113nwtb9bvq00000gp/T/abs_477u68wvzm/croot/certifi_1671487773341/work/certifi

ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: ‘/private/var/folders/sy/f16zz6x50xz3113nwtb9bvq00000gp/T/abs_477u68wvzm/croot/certifi_1671487773341/work/certifi’


The requirements.tx file contains the following line

certifi @ file:///private/var/folders/sy/f16zz6x50xz3113nwtb9bvq00000gp/T/abs_477u68wvzm/croot/certifi_1671487773341/work/certifi


Comment out the line in the requirements.txt file with a hash

# certifi @ file:///private/var/folders/sy/f16zz6x50xz3113nwtb9bvq00000gp/T/abs_477u68wvzm/croot/certifi_1671487773341/work/certifi

If you regenerate the requirements.txt file with the
pip freeze > requirements.txt
command, make sure to comment the line out again before you build the next Docker image of your Python application.