New on this platform

Hello,

This is my first time using Glitch. I want to build a Tic Tac Toe game with React, I remixed the starter React package and worked on setting up my project from a tutorial but I keep on having error on my log and nothing appears on my page. Any cues would be greatly appreciated. Thanks

[To prevent unauthorized access to your project, please do not post invite links publicly online. Instead, you can send invites individually to users who you want to help you]

Hi @Lila_Ait welcome! :smiley:

Please can you paste the error of your log here? So we can help you to find where is the problem and how to fix it

Also if you want to share your project here, do not post the invite to edit link, it would be better if you share it this way:

https://glitch.com/~your-project-name-here

1 Like

Thanks!
Sorry about that, here’s the project: https://glitch.com/~toe-tac-tic

Looks like you’re trying to use TypeScript syntax in a Javascript file.

Searching some forums I look that you do not need jsx-loader

Instead you need babel-loader. I tried it and it works but it fails the build but not the import anymore.

Go to your terminal and use this commands

pnpm install @babel/core
pnpm install babel-loader
pnpm install babel-preset-env

Then change your webpack.config.js, the 18 line

loader: 'babel-loader',

You will have a build error, but now can read the syntax

1 Like

Hi @Lila_Ait! You mentioned that you’re following a tutorial — it looks like that tutorial might expect you to be working client side, rather than from an Express server.

The project you remixed from (~starter-react) gets webpack to compile everything into bundle.js, which is linked at the bottom of app/index.html. You’ll need that in your index.html file as well, and you’ll need to use Node’s require and module.exports syntax instead of the import/export default syntax you’re using in your project.

Because your entry point is index.js, you’ll need to point the webpack.config.js file to that instead of app.js, too.

I remixed your project and made those fixes here — be sure to add your components to the app/components/ directory as you go along. Hope this helps you continue with the tutorial!

1 Like

Thank you so much for all your precious help :pray:

1 Like

Yay! Glad it was helpful. :slight_smile: