question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Blank page when importing package

See original GitHub issue

Hi there, this is just the standard App.js file that is initiliazed to which I imported the Avvvatars package. When I save the code and refresh the page, it turns blank (so no rendering). Note that I’m just importing the package and not using it either.

import logo from './logo.svg';
import './App.css';
import Avvvatars from 'avvvatars-react';

function App() {
  return (
    <div className="App">
      <header className="App-header">
        <img src={logo} className="App-logo" alt="logo" />
        <p>
          Edit <code>src/App.js</code> and save to reload.
        </p>
        <a
          className="App-link"
          href="https://reactjs.org"
          target="_blank"
          rel="noopener noreferrer"
        >
          Learn React
        </a>
        <p>
          
        </p>
      </header>
    </div>
  );
}

export default App;

I checked whether the package has been properly installed and it’s appearing in package.json too.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ouhzzzmancommented, Mar 16, 2022

You’re right, this is the error I’m getting from the console

Uncaught TypeError: goober.styled is not a function
    at Object../node_modules/avvvatars-react/dist/avvvatars-react.cjs.development.js (Shape.tsx:18:1)
    at Object.options.factory (react refresh:6:1)
    at __webpack_require__ (bootstrap:24:1)
    at fn (hot module replacement:61:1)
    at Object../node_modules/avvvatars-react/dist/index.js (index.js:7:1)
    at Object.options.factory (react refresh:6:1)
    at __webpack_require__ (bootstrap:24:1)
    at fn (hot module replacement:61:1)
    at Module../src/App.js (logo.svg:34:1)
    at Module.options.factory (react refresh:6:1)
0reactions
nusucommented, Mar 18, 2022

Thanks for letting me know, I’ve managed to reproduce it and fixed it with #7, you can install latest version and let me know if it works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React blank page when I try to import from another component
There are no errors while compiling but I have a blank page. import './App.css'; import StarRating from './StarRating'; import StarRating2 ...
Read more >
Import error in the browser and blank page in some templates ...
When I scaffold a new Vue or Preact project with create-vite@631a9bf , and then run npm run dev (after installing the dependencies), I...
Read more >
MERN STACK tutorial: Create React Frontend got blank page
I am using react-router-dom 6.3.0. I would greatly appreciate any suggestions. import React from "react"; import { BrowserRouter as Route, ...
Read more >
Solved: Imported a package - Blank PowerApp
Hi,. I'm attempting to import an app I created in one environment into the empty trial one I created to integrate a CDS...
Read more >
Remove blank page at end of document - TeX
I suspect that this may be due to the usage of the svg package. When I remove the import of this package, the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found