Source: https://mokxi.com/errors/has-no-member-named
Updated: 2026-11-16

Home / Errors
Arduino build error

# error: 'class HardwareSerial' has no member named 'printn'

The name after the dot is not a function or a field of that object. It is misspelled, it belongs to another class, or the library version has no such call.

Try the fixed sketch in Mokxi See the causes

- Build error
- 3 common causes
- Seen 290 times in failed builds on Mokxi in the 30 days to November 16, 2026.

The message

## What the Arduino IDE prints

Output window

The class named in the message tells you which object you are calling it on.

Mokxi's compiler, clang, words it as no member named 'printn' in 'HardwareSerial', often with a did you mean.

Causes

## The 3 usual causes with the fix

### 1The call is misspelled

Method names are case sensitive. Serial.printn and Serial.println are two different names.

Broken

Fixed

Mokxi’s build tab says: HardwareSerial has nothing called printn.

Try this fix in Mokxi

### 2A struct field is misspelled

A field is found by its exact name. Check the declaration of the struct.

Broken

Fixed

Mokxi’s build tab says: Point has nothing called z.

Try this fix in Mokxi

### 3A call that this library does not have

Code written for another library or version calls something this one lacks. Open the library example for the calls it has.

Broken

Fixed

Mokxi’s build tab says: Servo has nothing called turn.

Try this fix in Mokxi

FAQ

## Questions and answers

### What does "has no member named" mean?

The object has no function or field with that name. Check the spelling, the capital letters and the library.

### What is a member?

A function or variable that belongs to a class or struct, reached with a dot, such as Serial.println.

### Why does it fail only after I update a library?

Newer versions rename or remove calls. Look at the examples in the library for the current names.

Next

## More errors and the longer guide

- error: 'ledPin' was not declared in this scope
- error: 'Servo' does not name a type

The longer guide to this error All Arduino errors
