Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

beartown's avatar

Is it me, or are Inertia installation docs completely wrong?

Inertia installation guide doesn't seem to be working, at least for React.

First of all, when it's initially set up as described in there, it throws an error:

Vite manifest not found at: /Users/me/www/inertia-app/public/build/manifest.json

It wasn't mentioned in the docs, so I googled - the script needs to be built first.

Then, another error was that I couldn't use JSX syntax in app.js file. I tried to rename it to app.jsx. Also, not mention in the docs.

Then, another error:

Rollup failed to resolve import "react-dom/client"

Not sure what's wrong with that one. Am I doing something wrong, or are the docs just bad?

0 likes
6 replies
vincent15000's avatar

Any documentation gives you the minimum required information needed.

  • You had to build the manifest : it's the basis.

  • With React, you had to rename app.js to app.jsx, probably due to some configuration, but it's also the basis.

It's like a cooking recipe : mix the eggs with the sugar, but it's not mentioned that you need a bowl to do that, it's the basis.

Here on Laracast you have great tutorials in many different topics, don't hesitate to follow some of them.

https://laracasts.com/browse/all

3 likes
beartown's avatar

@vincent15000 why would they "give minimum required information" in shape of wrong information to set it up, when they can provide correct information? I understand the concept of docs being minimal, but it doesn't make any sense in this case.

Your answer was wrong anyway, because the thing missing was the manual installation of react-dom package, which also wasn't mentioned. It's required manually since React 18 and they just didn't update the docs. After having react-dom installed, JSX works just fine in .js files.

1 like
vincent15000's avatar

@beartown I think that I'm right.

The languages evolve so quick that it's difficult to keep a documentation up to date.

You are a developer and you need to be aware of this. Furthermore it looks like you didn't know that you had to build the manifest, which let me think that you are perhaps no so familiar with VueJS or React.

2 likes
beartown's avatar

@vincent15000 I am perfectly familiar with React and I have never needed to build any manifest files, apart from creating them manually in the days of PWA, which is dead anyway.

1 like
vincent15000's avatar

@beartown You necessarily need to build the manifest, either manually, or via a script if you are using CI/CD.

2 likes
beartown's avatar

Okay, so now all the build errors are gone (see my post above), but I'm getting the blank page with an error in dev tools console when running an Inertia page:

Unhandled Promise Rejection: ReferenceError: Can't find variable: React

Is it another undocumented feature I need to take care myself now when React 18 is out?

EDIT

I made it work by adding import React from 'react' in all of my files using JSX. Still not sure why it's needed, as it's redundant since React 17. I guess Inertia bootstraps React apps somehow differently? (It's also undocumented)

1 like

Please or to participate in this conversation.