# Support for Gatsby.js

**URL:** <https://pdfjs.community/t/support-for-gatsby-js/468>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [January 29, 2021, 8:30pm UTC](https://pdfjs.community/t/support-for-gatsby-js/468 "2021-01-29T20:30:36Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![travis.butler](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@travis.butler](https://pdfjs.community/u/travis.butler)\
**Post date:** [January 29, 2021, 8:30pm UTC](https://pdfjs.community/t/support-for-gatsby-js/468/1 "2021-01-29T20:30:36Z")

</div>

**PDF.js Express Version**  
7.2.2

**Detailed description of issue**  
My project is built using Gatsby and I was following the getting started guide for React. (gatsby uses react) I made sure to copy all the files to the static/public folder. However when I initialize the page, it throws a 404 error inside the div where the webviewer ref is.  
’ There’s not a page yet at `/webviewer/lib/ui/index.html`’

**Expected behaviour**

 ![Screen Shot 2021-01-29 at 3.30.00 PM](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/f1a911c4157655c4d37d35de2ea9af165fe322be.png)

**Does your issue happen with every document, or just one?**  
Every document

**Link to document**

> **[Job-Embedded-PD-2015.pdf](https://assets.ctfassets.net/xo7k5gkhtsb4/6BVRpmOL6sKkjXKHZj2MXQ/4d3825f979999fd81f5fd6ee937df5f6/Job-Embedded-PD-2015.pdf)**
>
> 515.88 KB

**Code snippet**  
import React, { useEffect, useRef } from ‘react’  
import Layout from ‘components/Layout’  
import WebViewer from ‘@pdftron/pdfjs-express’

```
const Test = () => {
	const viewer = useRef(null)
	useEffect(() => {
		WebViewer(
			{
				path: '/webviewer/lib',
				initialDoc: 'https://assets.ctfassets.net/xo7k5gkhtsb4/6BVRpmOL6sKkjXKHZj2MXQ/4d3825f979999fd81f5fd6ee937df5f6/Job-Embedded-PD-2015.pdf'
			},
			viewer.current
		).then((instance) => {
			
		})
	}, [])
	return (
		<Layout>
			<div className="h-screen">
				<p>TEST PDF</p>
				<div className="webviewer" ref={viewer}></div>
			</div>
		</Layout>
	)
}

export default Test
```

---

_[View the full topic](https://pdfjs.community/t/support-for-gatsby-js/468)._
