1

When I try to integrate @react-pdf/renderer into my project, it gives me the next error "Uncaught TypeError: module.runSetters is not a function"

Error:

Uncaught TypeError: module.runSetters is not a function

My code:

import React from "react";
import {
  Page,
  Text,
  View,
  Document,
} from "@react-pdf/renderer";


const Index = () => {
  
  return (
    <div>
      <Document>
        <Page >
          <View >
            <Text >Nombre 1</Text>
            <Text>Nombre 2</Text>
            <Text>Nombre 3</Text>
          </View>
        </Page>
      </Document>
</div>
)
}
export default Index;
React
  • 57
  • 7

2 Answers2

1

I also meet this error today. Have rise a ticket at github https://github.com/diegomura/react-pdf/issues/2011

Sherry
  • 11
  • 1
0

Updating the npm package @react-pdf/renderer to version 2.1.2 and above seems to cause a Meteor-only bug that I'm having a hard time understanding. The error seems to come from this file node_modules/normalize-svg-path/index.mjs, but the runSetters function is nowhere to be found.

React
  • 57
  • 7