A yarn winder comprising: a feeding section capable of feeding yarn; a winding section configured to wind yarn fed from the feeding section and to form a package; a yarn storage device provided in a yarn path formed between the feeding section and the winding section and configured to wind, by rotating a storage roller, the yarn Y fed out from the feeding section around a storage area in an outer peripheral surface of the storage roller to temporarily store the yarn; a controller configured to control rotation of the storage roller; and a detection section configured to detect the yarn wound around the outer peripheral surface of the storage roller, wherein a detection area of the detection section is a linear section in the storage area connecting between an upstream end side of the storage area in a traveling direction of the yarn and a downstream end side of the storage area in the traveling direction of the yarn relative to the upstream end side of the storage area, the detection section is a line sensor configured to detect presence or absence of the yarn in the linear section, the yarn winder further comprises a light emitting section configured to emit light toward the storage roller, the line sensor is configured to receive light reflected by the storage roller or the yarn, the controller is configured to determine that, when the line sensor receives light, the light received by the line sensor is the light reflected by one of the storage roller and the yarn, and to determine, based on a result of the determination, the presence or absence of the yarn in the linear section, the line sensor is provided at a position on which light from the light emitting section reflected by the outer peripheral surface of the storage roller is not incident and light from the light emitting section reflected by the yarn stored on the storage roller is incident, the yarn winder further comprises a cover facing a portion of the outer peripheral surface of the storage roller, and the cover is provided in at least a portion in the traveling direction of light from the light emitting section reflected by the outer peripheral surface of the storage roller. a feeding section capable of feeding yarn; a winding section configured to wind yarn fed from the feeding section and to form a package; a yarn storage device provided in a yarn path formed between the feeding section and the winding section and configured to wind, by rotating a storage roller, the yarn Y fed out from the feeding section around a storage area in an outer peripheral surface of the storage roller to temporarily store the yarn; a controller configured to control rotation of the storage roller; and a detection section configured to detect the yarn wound around the outer peripheral surface of the storage roller, wherein a detection area of the detection section is a linear section in the storage area connecting between an upstream end side of the storage area in a traveling direction of the yarn and a downstream end side of the storage area in the traveling direction of the yarn relative to the upstream end side of the storage area, the detection section is a line sensor configured to detect presence or absence of the yarn in the linear section, the yarn winder further comprises a light emitting section configured to emit light toward the storage roller, the line sensor is configured to receive light reflected by the storage roller or the yarn, the controller is configured to determine that, when the line sensor receives light, the light received by the line sensor is the light reflected by one of the storage roller and the yarn, and to determine, based on a result of the determination, the presence or absence of the yarn in the linear section, the line sensor is provided at a position on which light from the light emitting section reflected by the outer peripheral surface of the storage roller is not incident and light from the light emitting section reflected by the yarn stored on the storage roller is incident, the yarn winder further comprises a cover facing a portion of the outer peripheral surface of the storage roller, and the cover is provided in at least a portion in the traveling direction of light from the light emitting section reflected by the outer peripheral surface of the storage roller.